npm install console.log
require('console.log')
and go about your day
Simple, node will stay alive until there are no callbacks left in the queue. Assuming the application is not forcibly terminated (i.e. ^C, killall -9 node, etc...) it will run until all of the data passed to console.log
has been flushed to the terminal
Has this node bug been fixed? The ticket I see for it is closed but the patch was rejected:
nodejs/node-v0.x-archive#1312
I'm fixing some old code (nodeunit) that relies on this behavior, and want to make sure it's safe to remove before I do.