Instantly share code, notes, and snippets.
Why does Node log start and exit immediately? Shouldn't it keep the process alive, waiting for the promise to resolve (which it never will)?
Issue described in Node's issue tracker: nodejs/node#22088
As far as I know, as soon as that event loop is cleared that's the end of the process.
Because nothing is going to ever run after the promise is fulfilled there is nothing in the event loop to be done.
Oh my god, I'm pretty sure I ran into this for the first time a couple weeks ago! Thought I was going crazy, but like always my assumptions were just wrong. Thanks for giving me my sanity back.