This module created by demiremrece in order to inform the user(s) about problems of their web services/apis.
It uses standard http get request to check if service or api is up or down. If down, using nodemailer module, the users are notified by a mail regarding.
npm install service-status-check
service-status-check module works with GMAIL configuration. You need to pass your gmail account to send mails.
const HealthChecker = require('service-status-check');
const config = {
mail: {
sender: {
user: "[email protected]",
pass: "password"
},
to: "[email protected]",
// to: ["[email protected]","[email protected]"]
},
services: [
{
name: "My service",
url: "service.adress.com/get"
}
],
options: {
interval: 0.5
}
};
let myChecker = new HealthChecker(config);
myChecker.start();