puter 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +23 -0
  2. package/package.json +11 -0
package/index.js ADDED
@@ -0,0 +1,23 @@
1
+ const https = require('https');
2
+
3
+ const options = {
4
+ hostname: 'www.google.com',
5
+ port: 443,
6
+ path: '/',
7
+ method: 'GET'
8
+ };
9
+
10
+ const req = https.request(options, (res) => {
11
+ console.log(`statusCode: ${res.statusCode}`);
12
+
13
+ res.on('data', (d) => {
14
+ process.stdout.write(d);
15
+ });
16
+ });
17
+
18
+ req.on('error', (error) => {
19
+ console.error(error);
20
+ });
21
+
22
+ req.end();
23
+
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "puter",
3
+ "version": "1.0.0",
4
+ "description": "test",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "Apache-2.0"
11
+ }