Where can you find examples of console applications on node?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
9 views
Where to find I know, it is obviously on github, but can not find.
by | 9 views

4 Answers

0 like 0 dislike
Hid )
npm look for it console.
by
0 like 0 dislike
For example, Angular CLI.
Or Webpack.
by
0 like 0 dislike
Here's a console application written in nodejs that reads the stream stdin converts the text to uppercase and dumps it to stdout
// main.js var readline = require('readline'); var rl = readline.createInterface({ input: process.stdin }); rl.on('line', function(line){ console.log(line.toUpperCase()); }); rl.on('end', function(){ process.exit(0); });

Start like this:
cat some.file.txt | node main.js
by
0 like 0 dislike
by
110,608 questions
257,186 answers
0 comments
35,390 users