I have an node.js application that I can debug with node-inspector running:
node --debug app.js
But I want to use foreman to start my application so it will load environment variables in the .env file. Like so:
foreman start
Is there a way to run the app with foreman and also use node-inspector? I tried:
foreman start --debug
but didn't have any luck with that.
Thanks.
Why not use node --debug app.js
in your Procfile
If you only are concerned with environment variables, you may also consider using:
foreman run node --debug app.js
The run
command isn't exactly the same as start
; instead of firing up your entire app, it only runs a command in the context of your app's Heroku environment. So this may or may not work depending on your situation (if you have supporting workers, etc.).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With