NodeJS One Line Code Snippets

Posted by & filed under Node.js.


How to Install NVM (Node Version Manager) curl -o- | bash How to Install Node.js with NVM? nvm install v12.18.0 How to Set the Default Node.js version with nvm? nvm alias default v12.18.0 How to Pass command line (CLI) arguments to a Node.js app? process.argv.forEach((val, index) => { console.log(`${index}: ${val}`); }); node process-args.js one… Read more »