dead-persons-switch. Here's an example.
[KEY]at the end of the
WEBHOOK_URLConfig Variable with the personal key from step 3.
TRIGGERSenvironment variable on Heroku (Settings > Config Vars) to your liking. It is documented here.
You can check the status of your triggers by providing your secret key.
Make simple POST requests to keep your triggers alive.
curl -X POST https://dead-persons-switch.herokuapp.com/trigger/[TRIGGER_NAME]/with/key/[SECRET]
Configure the app using environment variables.
A secret key, so that other people can't meddle with your server.
What port should the server listen on?
What URL should the server POST to when a trigger fails to respond?
You must specify a protocol (e.g.
Each trigger follows this format:
TRIGGER_NAMEValid chracters are a-z, A-Z, 0-9, and _
DELAYAfter this many milliseconds of inactivity, start notifying the webhook
MAX_NOTIFICATIONSHow many times to notify the webhook while the trigger is inactive. Defaults to one.
NOTIFICATION_INTERVALHow long to wait between each webhook notification.
Define multiple triggers by separating each definition with a comma.
This defines two triggers:
What hostname should the server bind to?
To run automated tests, just
Copyright (c) 2017 Ben Ng email@example.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.