I am tired of typing "cd c:\socket\nodejs" "node testserver.js"
Into the command promt..
How do I create a shortcut or bat for it?
I am tired of typing "cd c:\socket\nodejs" "node testserver.js"
Into the command promt..
How do I create a shortcut or bat for it?
To do exactly as you asked, create a .bat file and inside type:
cd c:\socket\nodejs
node testserver.js
But what I would suggest is installing this thing I came across the other day called Lineman. It makes use of Grunt to automatically check for file updates on the fly. It also has built in support for Test'Em which makes unit testing a breeze. Using all of this, you could write a batch script more like this:
cd c:\socket\nodejs
lineman run
then just go from there without even needing to run node periodically. Furthermore, you could create a second batch like so:
cd c:\socket\nodejs
lineman spec
and keep that open so you can check in and make sure all of your unit tests are always passing.
testserver.js and reboot it every time you modify it. Same goes for any of your other scripts that are run through testserver.js. Glad I could help.
\$\endgroup\$