Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用这个运行 pm2:
pm2 start bin/www --watch ../
问题是当我在根文件夹中更新 app.js 时,它似乎不是自动重启节点。有任何想法吗?
想出了一个解决方案:
//processes.json: { "apps" : [{ "name" : "someExpress4App", "script" : "bin/www", "watch" : "../", "log_date_format" : "YYYY-MM-DD HH:mm Z", }] }
把它放在你项目的根目录上,然后像这样运行你的 pm2:
pm2 start processes.json