我的.env
文件中有我的 heroku 配置变量,所以我必须使用工头在本地运行我的应用程序。我需要使用node-inspector进行调试,并且我不想手动重新启动我的应用程序,所以我也想使用nodemon。
如何同时使用 nodemon、node-inspector 和 foreman?
我的.env
文件中有我的 heroku 配置变量,所以我必须使用工头在本地运行我的应用程序。我需要使用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"
你完成了!