【发布时间】:2015-08-04 11:05:13
【问题描述】:
我的 .env 文件中有我的 heroku 配置变量,所以我必须使用 foreman 在本地运行我的应用程序。我需要使用 node-inspector 进行调试,并且我不想手动重启我的应用程序,所以我也想使用 nodemon。
如何同时使用 nodemon、node-inspector 和 foreman?
【问题讨论】:
标签: node.js heroku node-inspector nodemon
我的 .env 文件中有我的 heroku 配置变量,所以我必须使用 foreman 在本地运行我的应用程序。我需要使用 node-inspector 进行调试,并且我不想手动重启我的应用程序,所以我也想使用 nodemon。
如何同时使用 nodemon、node-inspector 和 foreman?
【问题讨论】:
标签: node.js heroku node-inspector nodemon
真的很简单,只需在一个命令中将它们链接在一起即可。
# 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"
你就完成了!
【讨论】: