在文件更改时重新启动Heroku本地? [英] Restart Heroku local on file change?
问题描述
最简单的方法是使用运行nodemon, heroku local
作为可执行文件 - 即 nodemon --execheroku local
。不过,> heroku local
会退出,其中的默认节点关机信号(SIGUSR2)为非零退出代码,所以你需要给nodemon添加一个额外的标志来设置中断信号为SIGTERM。
nodemon --execheroku local--signal SIGTERM
(用heroku-cli@6.14.31-33a2d0a,nodemon@1.12.1,node@8.5.0测试) p>
It seems the local server started with "heroku local web" does not watch for file changes and restart itself. How can I make it do this?
The easiest way to do this is to run nodemon with heroku local
as the executable - i.e. nodemon --exec "heroku local"
.
However, heroku local
exits with a non-zero exit code for the default nodemon shutdown signal (SIGUSR2), so you need to add an additional flag to nodemon to set the interrupt signal to SIGTERM.
nodemon --exec "heroku local" --signal SIGTERM
(tested with heroku-cli@6.14.31-33a2d0a, nodemon@1.12.1, node@8.5.0)
这篇关于在文件更改时重新启动Heroku本地?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!