1.0.1 ā¢ Published 2 years ago
simple-web-pinger v1.0.1
simple-web-pinger
š” Simple web pinger is a "fork" of Simple website pinger(the simple website pinger github was deleted), you can use it to keep your repl.it or similiar projects online for 24/7!
ā If you like this package, don't forget to star Github repo here
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 |