Node.js - Overview

What is Node.js

Node.js is a Javascript runtime, which means it can parse and execute javascript code:

$ node
> var a = 1;
> a + 1

It is built on V8, the Javascript engine for Chrome, it shares the same features that run in the browser. And Node adds a few APIs beyond V8.

Node doesn’t run any of your application code in parallel

Why Node.js

  • same language(Javascript) for both server and client side.
  • event-driven, non-blocking I/O
  • npm, the package manager
  • awesome (and growing) libraries:

Check Versions And Upgrade

Check version of node:

$ node -v

Check version of npm:

$ npm -v

Upgrade node and npm:

$ npm install -g node
$ npm install -g npm

Or use yarn

$ yarn global add node