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 logsorheroku logs --tailto see what your Node process is writing to the console. For more information, see the documentation forheroku logs.Use
heroku run nodeto 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 NodeRedirect the process’s
stdoutandstderrto a file, which you can watch for activity. A code example of how to do this is available at http://pastebin.com/tpNvgv2a.