How can I register NodeJS as a default executable program for .js files on Windows and Linux
For example
//script01.js console.log("I'm executable") Then in cmd bash:
$: script.js I'm executable $: | On Windows I'm aware to the ControlPanel/Programs/Make a file type always open in specific program it work fine until I need to pass arguments to the script.
so let say I have :
//script2.js console.log('argument 3 is :',process.argv[2]) then :
$: script2.js myArg argument 3 is : undefind $: | instead of
$: script2.js myArg argument 3 is : myArg $: |