Tutorial

Build an alert feed. Signals detects a heart rate above its band and your server receives the alert as a signed webhook.

Complexity
2/5
Clients
Any server: Node.js shown
Time
30 minutes

You keep patients and readings in your own system. Signals judges each reading against a heart-rate band and tells your server when one breaches it, when someone acknowledges the alert, and when the patient recovers.

  1. 1ovok listen forwards signed Signals events to this machine.
  2. 2Post a heart-rate reading above the configured band.
  3. 3Acknowledge the alert and watch the receiver confirm it.

What you'll build

  1. A local server that receives and verifies Signals webhooks.
  2. A webhook subscriber that points Signals at it.
  3. A patient and a reading that breaches the band.
  4. The finished app.

If a delivery doesn't arrive, debug it.

Create a sandbox projectConsole

Sign in to the Console and create a project in the sandbox environment. Signals gives the project a tenant of its own on its first request.

Create the appsConsole

Create a Manager app, which runs the tenant and reads alerts, and a Submitter app, which posts readings. Copy each one's id and secret. Get started shows the steps, and Applications explains the types.

  1. 1Applications lists the client apps for this project.
  2. 2Create a Manager client for reading Signals alerts.
  3. 3Copy the client ID and one-time secret while they are shown.
  4. 4Create a Submitter client for posting readings.
  5. 5Save the Submitter ID and one-time secret for your sender.

Set the environmentTerminal

Save the credentials where every later page reads them:

.env
OVOK_MANAGER_ID=…
OVOK_MANAGER_SECRET=…
OVOK_SUBMITTER_ID=…
OVOK_SUBMITTER_SECRET=…
SIGNALS_SIGNING_SECRET=

Leave SIGNALS_SIGNING_SECRET empty: Register the webhook gives it to you. Load the file into your shell with set -a; source .env; set +a.

Next

Run a local server.

Last updated on

On this page