Accept Lockitron webhooks and send events to Slack to keep a log.
This app is meant to have as few dependencies as possible in production so that it has a fast startup time on Heroku.
Currently, it only depends on rack
in production.
-
bundle install
-
Create a
.env
from the exampleSLACK_URL
: Grab a webhook URL from Slack for the channel you want.API_KEY
: A random string. Generate one by runningbin/generate-key
.RACK_ENV
: Should beproduction
in production. Otherwise, doesn't matter.
-
Run locally with
shotgun
-
Your webhook URL will be something like
https://example.com/?api-key=my-api-key-abc123
bin/test
bin/test http://example.com abc123-my-api-key
API key will be taken from .env
if not specified.