How can I run Node.js like node? at the moment I have to Cd into the directory of my js script, is there a way to run it from any where?
2 Answers
There can be possible answer like the one suggest by @ajtrichards, its one way to achieve what you like.
In other ways you can follow full path approach and create a .bat file, one time effort, after that you need only to click that file to run your node app.
Other way, If supposed in your app structure your server folder is of different shape i.e. main file is located at inner leve (its possible in some cases), you can configure package.json to handle your server execution with npm start.
Above are just possible suggestion.
.batfile, it will ease your life