I have a web server written in Node.js and I would like to launch with a specific folder. I\'m not sure how to access arguments in JavaScript. I\'m running node like this:>
Although Above answers are perfect, and someone has already suggested yargs, using the package is really easy. This is a nice package which makes passing arguments to command line really easy.
npm i yargs
const yargs = require("yargs");
const argv = yargs.argv;
console.log(argv);
Please visit https://yargs.js.org/ for more info.