Installing node as a service will help us as below.
Steps:
- Run in the background
- Restart automatically if it crashes
Steps:
- Install NSSM (non-sucking service manager). This tool lets you host a normal.exe as a Windows service.
- Go to command prompt.
- Execute nssm.exe install node-service c:\nodejs-path\node.exe c:\code\sample\server.js
- Execute net start node-service
For more information see here.
No comments:
Post a Comment