5
有没有什么方法能让 go 写的命令行程序在 windows 上以服务的方式运行
source link: https://www.v2ex.com/t/782796
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
以 windows 服务的方式运行,避免误关闭之类的操作
12 条回复 • 2021-06-11 09:31:30 +08:00
zengming00 27 分钟前
如果你还玩 nodejs 的话,pm2 是个不错的选择,因为在所有平台都通用
直接一条命令搞定(注意你的程序与参数之间有两个减号)
pm2 start 你的程序 -- 传递给你程序的参数
直接一条命令搞定(注意你的程序与参数之间有两个减号)
pm2 start 你的程序 -- 传递给你程序的参数
anubu 7 分钟前
对比过 nssm 和 winsw,nssm 虽然较久没更新,但更好用。最简单的方法是使用 powershell 命令,两三句命令就能搞定,如果不考虑大量程序管理维护的话,是不错的方法。
dream4ever 4 分钟前
@zengming00 PM2 +1,公司买的阿里云服务器装的是 Windows Server 2012,之前解决了 PM2 在注销远程桌面连接后会自动退出的问题后,就彻底省心了,PM2 从几年前用到现在,很方便。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK