Install
$ npm i web-uptimer
Setup
const up = require('web-uptimer');
const uptimer = new up.Uptimer({ timeout: 30000});
Example
const uptimer = new up.Uptimer({ timeout: 600000, client: 'got' });
uptimer.add('https://example.com', '123456789123456789')
uptimer.start();
setTimeout(() => {
uptimer.substring('https://example.com', '123456789123456789');
uptimer.stop().then(console.log('Stopped'));
}, 4000)
Get all
uptimer.allById('123456789123456789').then(array => console.log(array));
uptimer.all().then(array => console.log(array));
Endpoints
Value | Param |
---|
add | url, id |
substring | url, id |
allById | id |
all | |
start | |
stop | |
Contact
Youtube, Discord