UNPKG

better-uptime

Version:

Uptime module with advanced features

50 lines (36 loc) 1.32 kB
## What is this module ? This module help to 7/24 a project and you can uptime bot with this module easily! ## How can i use ? ```js 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 ```js 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)" }); ``` # Methods | Method | Type | Description | | ------------- |:-------------:|:--------------:| | new Uptime() | Object | You can uptime your project or any other project |