使用 Winser 和 NSSM 将 Node.js 应用程序作为 Windows 服务运行
在 Windows 中使用 Node.js 应用程序作为 Windows 服务,可以通过以下步骤完成:
1. 安装 winser:
使用以下命令安装 winser:
npm install winser
- 命令行参数说明:
-v, --version显示 winser 版本并退出-a, --autostart安装后立即启动应用程序-i, --install将 Node.js 应用程序安装为 Windows 服务-r, --remove卸载 Node.js 应用程序对应的 Windows 服务-x, --stop停止该 Windows 服务
文件大小:232.59KB
评论区