Skip to content

Instantly share code, notes, and snippets.

@mtorre4580
Created April 9, 2023 17:08
Show Gist options
  • Save mtorre4580/ed5a04557886939b4bf8d259aaee03c3 to your computer and use it in GitHub Desktop.
Save mtorre4580/ed5a04557886939b4bf8d259aaee03c3 to your computer and use it in GitHub Desktop.
Example to retrieve the arguments in a node process
// Retrieve the arguments pass to the process
// Skip the first arguments (node path | file path)
const [, , ...params] = process.argv;
console.log("params recieved in the process", process.argv);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment