Skip to content

heartbeat-sh/heartbeat.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

heartbeat.js

A js client library for heartbeat.sh.

Usage

Install the package with npm i heartbeat-sh

Example Usage:

const heartbeatClient = require('heartbeat-sh')

const secondsPerDay = 86400
const secondsPerHour = 3600

const myClient = new heartbeatClient({subdomain: "example"})

// Send a heartbeat
myClient.SendHeartbeat("example:js", secondsPerDay + 2 * secondsPerHour, secondsPerDay * 2)

// Delete a heartbeat
myClient.DeleteHeartbeat("deleteme")

Links