How Node Applications Work
Node.js couples JavaScript with an event loop for quickly dispatching operations when events occur. Many JavaScript environments use an event loop, but it is a core feature of Node.js.
Nodeâs philosophy is to give you low-level access to the event loop and to system resources. Or, in the words of core committer Felix Geisendörfer, in Node âeverything runs in parallel except your code.â[4]
If this seems a little backwards to you, donât worry. The following figure shows how the event loop works.
As long as thereâs something left to do, Nodeâs event loop will keep spinning. Whenever ...
Get Node.js the Right Way now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.