Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js can be used to write web servers, real-time chat servers, and utility programs like file management scripts. It is best for asynchronous applications and not for CPU intensive tasks like stock calculations. Under the hood, Node.js uses an event loop to handle asynchronous, single-threaded, event-driven programming.
2. Intro
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O
model that makes it lightweight and efficient.
- Source: https://nodejs.org/
3. Chrome, V8 and
Node.js
V8 is a JavaScript Engine which runs
inside chrome
Node.js is the V8 taken out of Chrome
and running on your OS
Nodejs can listen to network traffic on
your computer and can interact with
your computers filesystem.
4. Dive in
What can you do with Node.js?
- Write web enabled applications like web
servers, real-time chat servers etc.
- Write utility programs like moving files
around the OS, live reloading scripts etc.
Where not to use Node.js?
- CPU intensive applications like stock
trading calculations etc.
Basically, you can do everything you
can with PHP or Ruby on Rails or
Python, with Node.js