我的 .env
文件中有 Heroku 配置变量,因此我必须使用 foreman 在本地运行我的应用程序。我需要使用node-inspector进行调试,并且我不想手动重新启动我的应用程序,所以我还想使用nodemon。
如何一起使用nodemon、node-inspector和foreman?
最佳答案
这真的很简单,只需将它们全部链接到一个命令中即可。
# start node-inspector in the background
$ node-inspector &
# make nodemon execute foreman with debugging options enabled for app.js with
## either
$ nodemon --exec "foreman run node --debug-brk app.js"
## or
$ nodemon --exec "foreman run node --debug app.js"
你就完成了!
关于node.js - 如何让 node-inspector 与 foreman 和 nodemon 一起运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30396452/