NodeJS Stream to a text file
JS
S
JavaScriptThe simplest example is just in writing UTF8 text.
1// Simple example
2var fs = require('fs');
3var wstream = fs.createWriteStream('myOutput.txt');
4wstream.write('Hello world!\n');
5wstream.write('Another line\n');
6wstream.end();Created on 1/23/2018