reading-notes

View on GitHub

Node.js

Node.js

According to StackOverFlow Node.js is an event-based, non-blocking, asynchronous I/O runtime that uses Google’s V8 JavaScript engine and libuv library. It is used for developing applications that make heavy use of the ability to run JavaScript both on the client, as well as on server side and therefore benefit from the re-usability of code and the lack of context switching.

To install node to environment use the following command.

nvm install v

where v is the version of the node.js, it is recommended to have a version 12+.

nvm install 12

you can check node.js version in your CLI using the following command.

node --verison

it will show something like this v12.20.2.

to test that node.js is up and working, you can run your first program.

first type node in your CLI to start node.js, you will see something like below

Welcome to Node.js v12.20.2.
Type “.help” for more information.

then run the following line of code.

console.log('Hello, there');

it should log Hello, there to the terminal (console).