I'm using heroku to deplay a node.js website with my Mac (Mac OS 10.6.8. Snow Leopard). I have node 0.6.8.
Is there a way to see the watch the app's activity, for example console.log information?
"heroku console" and "heroku run console" don't seem to work...
Thanks!
You have three options. From best to worst, they are:
Use heroku logs
or heroku logs --tail
to see what your Node process is writing to the console. For more information, see the documentation for heroku logs
.
Use heroku run node
to run your Node app interactively. The only problem with this is that your app will start when you execute the run command, and it will exit when you exit. You can read more about this in the Heroku documentation for Node
Redirect the process's stdout
and stderr
to a file, which you can watch for activity. A code example of how to do this is available at http://pastebin.com/tpNvgv2a.
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