A starter that I use to spin up slack apps. The updates are still on a branch on my local machine that I need to push.
-
Set up ngrok.
- Download ngrok and add it to your classpath.
- Sign up for a free ngrok account and follow the instructions to add your auth token to your local configuration. This allows your ngrok tunnels to run indefinitely.
- Go to your ngrok dashboard to reserve a dedicated domain. This allows you to use the same domain across ngrok tunnel restarts.
-
Create a Slack app on https://api.slack.com/apps named
Whatever's special to you ($YOURNAME dev)
. -
Fully configure your Slack app.
- The settings on all of the sub-pages under "Features" should be identical to the configuration of the Slack staging app except for the following items. Ask a team member if you don't have access to view the staging app configuration.
- All app URLs should be based from your ngrok-provided URL (e.g.
https://<ngrok-url>.ngrok.io/slack/events
) instead of the hosted staging app URL . - All slash commands should be namespaced in the form of
/slashcommand
.
-
Copy
.env.template
in the root directory of this repository to.env
. In this file you will provide your application with the configuration details we specified above. Follow the instructions in that file. -
Run
yarn
ngrok http 3000 -subdomain=YOURSUBDOMAIN
. This will start ngrok for your desired port and subdomain.now dev
. This will start your database and the node app.- Go to
https://YOURSUBDOMAIN.ngrok.io/
, - In Slack, type
/slashcommand
to use your app!
Local changes should be picked up automatically without needing to restart the app.
within the root directory
$ touch now.json
$ now secret add <your-secret>