- Slack team to abuse with cookies
- Heroku account
- Heroku CLI
- Go to api.slack.com/apps
- Click the "Create New App" button
- Give your app a name and select a team where the app will be installed
- Go to "Bots" under "Add features and functionality"
- Add a bot user, give it a name and remember to switch off the "Always Show My Bot as Online" setting
- Go back to your app's overview page and select "Install your app to your team"
- Click the "Install your app to your team" button
- Visit your slack app's overview page
- Go to "Permissions" under "Add features and functionality"
- Copy the "Bot User OAuth Access Token" token
- Duplicate the
slack.config.sample.jsonfile and rename it toslack.config.json - Open the file
- Fill it with your access token
NOTE: The config file is ignored by GIT so that your access tokens don't get shared to the World when you commit. Access tokens will be set up as environmental variables on Heroku in the next step.
- Checkout from GitHub repository
- Navigate to project's folder
- Create new Heroku app and add it as remote to your local GIT repository `heroku create ``
- Set the bot user's OAuth access token as environmental variable for your Heroku Node server by running the following command:
heroku config:set BOT_AUTH_TOKEN=<access-token-here> - Deploy the app on Heroku
git push heroku master - You should now see the bot user as online on your Slack channel
To stop the Heroku app from running, run the following command:
heroku ps:scale bot=0
Similarly, if you want the app to start again:
heroku ps:scale bot=1
To view logs from Heroku app in real-time, use the following command:
heroku logs -t