When a Node.js application starts running, the V8 engine will run the application code you write. Objects in your application will keep a list of observers (functions registered to events). These observers will get notified when their respective events are emitted. When an event is emitted, its callback function will be enqueued into an event queue. As long as there are remaining events in the queue, the event loop will keep dequeuing events in the queue and putting them onto the call stack.
Cutouts is an open source application. Code licensed under the MIT license. Copyright 2018 Siddharth Kannan