Search code examples
javascriptnode.jsubuntu-14.04forever

forever start command not working


I am using following command to start forever command:

/usr/local/bin/forever start /var/www/html/test.js  | tee /tmp/forever-start.log 

But it doesn't work. Not printing output in log file. In test.js,
I have this code: console.log('Server running...');


Solution

  • forever will not output what you're printing with console.log.

    You should use forever's -o OUTFILE option to specify a log file. Like so:

    forever start -o /tmp/forever-start.log /var/www/html/test.js