An Amazon Lambda Slack Team invitation service.
First, for and clone this repository!
Then:
- Get an Amazon Web Services account
- Get a Slack team account & an authentication token
- run
npm install
- set environment variables:
SLACK_TOKEN
should be the tokenSLACK_TEAM
should be the team, i.e. slack.com subdomain (e.g.weave-community
forweave-community.slack.com
)ALLOW_ORIGIN
either*
or URL prefix of the UI (e.g.https://slack.weave.works
)
- run
npm run deploy
(use--
to add any arguments)- e.g. for prod deployment in London region use
npm run deploy -- --region eu-west-2 --stage prod
- e.g. for prod deployment in London region use
Once you have deployed the Lambda stack, you can deploy content of docs to Github pages (or elsewhere).
After you run npm run deploy
, you should run ./generate-page-config.sh
and it will generate docs/config.js
which will contains configuration variables. You want to track docs/config.js
along with any other changes
in your fork, as it needs to be hosted along with other HTML files in docs
directory.
To test the function deployed in dev stage use index.html#dev
, otherwise it defaults to one in prod stage.