GithubHelp home page GithubHelp logo

alexxnica / incubator-openwhisk-slackinvite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/openwhisk-slackinvite

0.0 1.0 0.0 10 KB

Invite for Apache OpenWhisk Team on Slack

Home Page: https://openwhisk.github.io/openwhisk-slackinvite/

JavaScript 12.09% HTML 87.91%

incubator-openwhisk-slackinvite's Introduction

openwhisk-slackinvite

Simple webpage for invitations for Apache OpenWhisk Slack Community

Join our Slack https://openwhisk.github.io/openwhisk-slackinvite

Backend is implemented as a serverless action with api gateway route

Installing

Deploy action

Configure the wsk CLI with authentication and host

Create the action using wsk CLI and set default parameters

wsk action create slackinvite action.js -p org "myslackteam" -p slacktoken "xop-12345..."

The org is the Slack team name, usually the hostname from your .slack.com. The slacktoken is a token for a user with admin access. You can get one from https://api.slack.com/docs/oauth-test-tokens Recommend creating a bot user with admin to use for invites.

Verify the action by invoking with the wsk CLI

wsk action invoke slackinvite -p email "[email protected]"

The action should do a http call to the slack API using the team host and token, then Slack will send the invite to the email provided.

Expose action

Create a public url to invoke the action using wsk CLI

wsk api-experimental create /openwhisk-team /slackinvite GET slackinvite

The command will print the new url created

ok: created api /slackinvite GET for action slackinvite
https://21ef035.api-gw.mybluemix.net/openwhisk-team/slackinvite

Verify the exposed url by invoking using the curl CLI or a web browser

curl -X GET https://21ef035.api-gw.mybluemix.net/openwhisk-team/[email protected]

Update index.html

Edit the line var actionUrl = "https://..."; and replace the value with your new url that expose your new action.

Deploy to github-pages

Create a new github repo, then go to settings, and set master branch as github page. Push the modified index.html to the new repo, then your webpage would be accesible from https://$username.github.io/$reponame

License: Apache-2.0

incubator-openwhisk-slackinvite's People

Contributors

csantanapr avatar krook avatar mrutkows avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.