gpt4 book ai didi

node.js - 如何让 node-inspector 与 foreman 和 nodemon 一起运行?

转载 作者:太空宇宙 更新时间:2023-11-03 22:15:25 24 4
gpt4 key购买 nike

我的 .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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com