Node.js Compile & Run Script for Windows
When developing on node.js, I find that I do this routine a lot:
- Make code change
- Kill/restart node.js process
- Reload browser
Instead of switching between 3 windows, I decided to make a batch script (.bat) to do this for me. As an added extra, it also concatinates separate javascript files too.
c:
cd C:\yourworkingdirectory\
taskkill /IM node.exe /F
taskkill /IM firefox.exe /F
rm server.js
type globals.js game.js nodeserver.js > server.js
start "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "http://localhost/"
node server.js
P.S. Yes, sometimes I do develop in windows. Until AAA games are developed for linux I will continue occasionally.
Do you know any way of hotswapping files in nodejs? Its a pita to restart my servers any time a make a small change in any of the source files…
Thanks , I’ve just been searching for information about this topic for a while and yours is the greatest I’ve discovered till now. But, what concerning the conclusion? Are you sure about the supply?