hi_viral 1.0.0

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.
Files changed (2) hide show
  1. package/me.js +22 -0
  2. package/package.json +16 -0
package/me.js ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+
3
+ import https from 'https';
4
+ import chalk from 'chalk';
5
+
6
+ const url = 'https://viralvaghela.com/hi.txt';
7
+
8
+ https.get(url, (response) => {
9
+ let data = '';
10
+
11
+ // A chunk of data has been received.
12
+ response.on('data', (chunk) => {
13
+ data += chunk;
14
+ });
15
+
16
+ // The whole response has been received. Print out the result.
17
+ response.on('end', () => {
18
+ console.log(chalk.green(data));
19
+ });
20
+ }).on('error', (err) => {
21
+ console.log(chalk.red('Error: ' + err.message));
22
+ });
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "hi_viral",
3
+ "version": "1.0.0",
4
+ "description": "this is my intro",
5
+ "main": "me.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "start": "node me.js"
9
+ },
10
+ "author": "viralvaghela",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "axios": "^1.3.4",
14
+ "chalk": "^5.3.0"
15
+ }
16
+ }