Search for a command to run...
Node's two microtask queues, and which one drains first
The main module runs
Requiring and executing the entry file is synchronous work, before the event loop starts at all.
Execution
1console.log('start');//output: 12 3process.nextTick(() => {4 console.log('nextTick 1');5 process.nextTick(() => console.log('nextTick 2'));6});7 8Promise.resolve().then(() => {9 console.log('promise 1');10 process.nextTick(() => console.log('nextTick 3'));11});12 13queueMicrotask(() => console.log('microtask 2'));14 15console.log('end');