1. What is it

NodeJS is the runtime environment for JS.
Both NodeJS and JS can use ES6 syntax, which stands for ECMAScript 2015 specification.

NodeJS = ECMAScript + nodejs API;
Javascript = ECMAScript + web API;

ECMAScript

  • Defines syntax that must be followed when writing JavaScript and NodeJS.
  • You can’t manipulate the DOM, you can’t listen for click events, you can’t send Ajax requests.
  • Cannot process HTTP requests, cannot manipulate files.
  • If only ES, you can’t complete the project.

Javascript

  • The ES syntax specification is used, plus a Web API.
  • Implement DOM operation, BOM operation, event binding, Ajax and so on.
  • After ES+ Web API, and JS, can complete any browser operation.

NodeJS

  • Use the ES syntax specification, plus the NodeJS API.
  • For handling HTTP, handling files, and more, see http://nodejs.cn/api/.
  • ES+ NodeJS API, you can complete any operation on the server side.

2. NodeJS Frameworks