npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

pingme

1.0.1

@isaacs

npmHomeRepoSnykSocket
Downloads:12
$ npm install pingme
DailyWeeklyMonthlyYearly

pingme

Super simple HTTP server that can be easily pinged so that Nagios et al can know your stuff's healthy.

USAGE

var pm = require('pingme');
pm({
  status: function(cb) {
    // cb(new Error('oh noes!')); if not ok
    cb(null, {
      pid: process.pid,
      whateverRandom: dataYouWantToShow
    })
  },
  ping: function(cb) {
    cb(null); // cb(new Error('oh noes!')) if not ok
  },
  // pass in ssl: { key, cert } to use https instead
  // pass in `server: someServer` to hijack its request handler
  // but be warned that this takes over the /ping and /status urls
}).listen(1337);