winsw是一个开源项目,程序以及源码可以在Git Hub中下载:
Releases · winsw/winsw · GitHub
winsw是一个可以将任何应用程序注册成服务的软件
下载winse.exe
winsw.xml配置如下:
node-service/id>
node-service
To start node as service.
D:\your\path\xxx.exe
Automatic
rotate
安装服务命令:winsw.exe install
卸载服务命令:winsw.exe uninstall
注意:xml配置文件的名字需与winsw.exe相同,比如test-node.exe与test-node.xml