1. Download:
Http://nssm.cc/download/?page=download
2. Unzip:
Select the appropriate 32bit or 64bit according to your system, and then copy the corresponding executable file to the system environment. Configure environment variables;
3. Configuration:
CMD command line mode, go to the NSSM directory or run the following command directly:
NSSM Install NodeJS
(Nodejs is the name of the service installed under the test environment, the test case is the node program)
In the Path
Select your installed Node.exe, Startup directory
Select your node app's directory, Argument
enter your startup file, such as run on my desktop index.js
(in the Startup directory directory execution node index.js
):
Select the install service. can be installed successfully. The default is auto-start, which is boot.
4. Start the service:
net start NodeJS
Perfect start-Up OH
Reference: HTTPS://CNODEJS.ORG/TOPIC/50A5AEE6637FFA4155F30DFC
http://my.oschina.net/u/1582119/blog/316069
Under Windows, use NSSM to set up a new service to start the boot, etc.