simple-web-pinger
Features:
-
⏱️ Easy to use -
🚀 You can also create webserver for your project, to make it pingable -
⚙️ Custom ping interval option and custom port for webserver option
Example code:
const pinger = require("simple-web-pinger")
pinger.webserver(3000) // Create webserver on port 3000
pinger.ping("Your project url") //default interval is 1m, or you can specify own interval in ms
Example no logs:
const pinger = require("simple-web-pinger")
pinger.webserver(3000, "<html><body><p>hello</p><body></html>") // Create webserver on port 3000
pinger.pong("Your project url", 6000) //default interval is 1m, or you can specify own interval in ms
Example discord logs:
const pinger = require("simple-web-pinger")
pinger.webserver(3000) // Create webserver on port 3000
pinger.pingd(client, "1234567890", "Your project url", 6000, 'discord logs') //default interval is 1m, or you can specify own interval in ms
Documantion:
Methods | Type | Required | Default | Description |
---|---|---|---|---|
ping("Your url", your interval in ms, log ping outputs, "name of pinger") | String, Object, Boolean, String | true, false, false, false | None, 60000, true, 'pinger' | Start to ping the provided url every provided time |
pong("Your url", your invertal in ms) | String, Object | true, false | None, 6000 | Ping url but no logs or console text |
webserver(your port, 'html code') | Object, String | false, false | 3000 | Create simple websever for your project, to make it pingable |
pingd(client, 'channelID', "your url", your invertal in ms, 'name of pinger') | Object, String, String, Object, String | true, true, true, false, false | None, None, None, 60000, 'pinger' | ping the supplied url and send logs to specified discord channel |