View on GitHub

reading-notes

Reading Notes about Markdown-Html-Css-JavaScript

Node.js

Node.js is an event-based, non-blocking, asynchronous I/O runtime that uses Google’s V8 JavaScript engine and libuv library.

Node.js is a program we can use to execute JavaScript on our computers. In other words, it’s a JavaScript runtime.

Notes :

  1. Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine.
  2. The V8 engine is the open-source JavaScript engine that runs in Google Chrome and other Chromium-based web browsers, including Brave, Opera, and Vivaldi. it’s responsible for compiling JS code.
  3. It’s better to install NVM(Node Version Manager), in case you have to install different versions of node JS.
  4. To install nvm please follow it’s original repo NVM
  5. To check the node versions you have, type nvm ls
  6. To install a certain version of nvm, type nvm install -version-
  7. To use a node version other than the one you are using, type nvm use -version-.
  8. Please refer to this page for deploying nvm nvm guide
  9. We use npm to install node packages.
  10. When installing node packages it will create a file package.json, and it will contain all the packages we installed.

Installing jshint package Globally

npm install -g jshint

then adding

/* jshint esversion: 6 */

at the top of JS file.

Working with the package.json File

npm install

Node.js speaks JSON. JSON is probably the most important data exchange format on the Web, and the lingua franca for interacting with object databases.

What Is Node.js Used For?

installing (via npm) and running (via Node)