Skip to content

getditto/template-heartbeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heartbeat

Monitor the status of Ditto on the cloud and locally.

HTTP -> Big Peer -> Small Peer -> Big Peer -> CDC

Installation

> npm install

Setup

  1. Replace APP_ID and TOKEN in index.ts with your values.
  2. Replace APP_ID in heartbeat.sh with your values.
  3. Build index.js
> npm run build

Terminal 1

Run the heartbeat. This script will send an HTTP request to the Big Peer every 10 seconds.

./heartbeat.sh

Terminal 2

Run a small peer node that subscribes to the document updated via the HTTP API. It then updates the timestamp on that document to acknowledge receipt.

node index.js

Terminal 3

Use with Change Data Capture to listen to all changes from the server-side.

About

Monitor the full health of ditto end-to-end

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •