Node.js console.log() in txt file
Just run the script in your terminal like this… node script-file.js > log-file.txt This tells the shell to write the standard output of the command node script-file.js to your log file instead of the default, which is printing it to the console. This is called redirection and its very powerful. Say you wanted to write … Read more