commit | b0e6c5ab804a3ae631da98fa04797b5c41ca5cfb | [log] [tgz] |
---|---|---|
author | Carlos Santana <csantana23@gmail.com> | Tue Feb 07 15:36:22 2017 -0500 |
committer | GitHub <noreply@github.com> | Tue Feb 07 15:36:22 2017 -0500 |
tree | 2004e9a2d1e146ec2c1c091e2322461f8ad1fcc2 | |
parent | 8cd092e8e779fcdc1559828051ed4000a5a74745 [diff] |
update wrong label for slack domain (#4)
Simple webpage for invitations for Apache OpenWhisk Slack Community
Join our Slack https://csantanapr.github.io/openwhisk-slackinvite
Backend is implemented as a serverless action with api gateway route
Configure the wsk
CLI with authentication and host
Create the action using wsk
CLI and set default parameters
wsk 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 "user@example.com"
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.
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/slackinvite?email=user@example.com
Edit the line var actionUrl = "https://...";
and replace the value with your new url that expose your new action.
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