Run
$ EDITOR='code --wait' rails credentials:edit
Edit the file with:
slack:
token: <YOUR_SLACK_TOKEN>
channel_id: <YOUR_CHANNEL_ID>
In order to receive incoming requests locally, we can use ngrok
, which allows us to tunnel requests from a public URL into our local development system.
$ ngrok http 3000
The URL generated by ngrok should be set in Slack:
- In Interactivity & Shortcuts (Request URL:
<NGROK_URL>/interaction
) - In Slash Commands (Request URL:
<NGROK_URL>/reminder
)
Add the host to environments/development.rb
:
config.hosts << <NGROK_URL>
To get your containers running, run:
$ docker-compose up
After adding the Slack bot to your channel, call it with /remind_water
.
Slack Modal:
Example Reminder: