Node.js's goal is to provide an easy way to build scalable network programs. Node.js communicates to the operating system (via epoll, kqueue, /dev/poll, or select) that it should be notified when a new connection is made, after which it goes to sleep.If someone new connects, then it executes the callback.