| Node.js Writing Stream
Node.js Writing to stream
Well to understand this we will create a JavaScript file which name as main.js and have the following code:-
File: main.js
Now we open Node.js command prompt and then run the main.js and code is given below.
node main.js
After running the above command you will get the below result:-
Now, after running the above code you will see in text file name "output.txt" is created and where you had saved "input.txt" and "main.js" file. and if it is on desktop.
Once you open the "output.txt" and you will see the following content.
| | |