Create a shortcut that executes a file in Node.js

1

I have a program made in Node.js that is on the route:

D:\Dropbox\js-arduino\LEDJavascript\index.js

Obviously I run it from the terminal as follows:

node index.js

Is there a way to create a script that just by double clicking, start running the program? To avoid the work of being entered to the location of my project files through the console.

    
asked by Juan Sánchez 07.11.2016 в 22:51
source

1 answer

1

Try doing a script in batch like this:

node D:\Dropbox\js-arduino\LEDJavascript\index.js

You save it with the .bat extension and you can execute it from wherever you want

    
answered by 07.11.2016 / 22:54
source