This module help to 7/24 a project and you can uptime bot with this module easily!
How can i use ?
const { Uptime } = require("better-uptime")
var uptime = new Uptime({
url: "https://your.domain/",//website link
time: 1,//time
time_type: 'minute',// you can use millisecond, minute, hour, day, week
callback: "console.log('your.domain successfully uptime!')"//callback function action to be performed each time it uptimes
})
Documentation
Method
Type
Description
new Uptime()
Object
You can uptime your project or any other project
Variables you can use
Variable
Description
Link
Shows pinged link
Time
Shows how long it took to recur
Task
Shows the action to be performed each time the link is pinged
Time_type
Shows the time type
Example usage
var a = new Uptime({
url: "https://your.domain.com/",
time: 1,
time_type: "minute",
callback: "console.log('your.domain successfully uptime!',link, time_type, task, time)"
});