Make pm2 log to console
Solution 1:
I believe you can also see the stdout and stderr of a process that is running daemonized by the command pm2 logs
or pm2 logs [app-name]
.
Solution 2:
you can easily achieve that by starting another terminal/console and run this command
pm2 log
logs everything to the terminal except console.log
pm2 logs
logs everything to the terminal and console.log
notice the 's' in the second command
Solution 3:
Found the answer (their documentation is not that great), just added the --no-daemon
flag, seems to have done it. Although, it appears that it's still logging to the file (even when using the flag) on the first uptime. Once the process gets restarted (I'm watching for file changes) it starts logging out to the console