全局安装forever forever /demo/app.js //后面是运行node程序的路径 帖子:forever进行node服务器的不间断运行的例子 但现在发现,pm2比forever方便,也是需要全局安装:npm install -g pm2,可以尝试一下,教程有很多,这里就不贴了,