Node.js Tutorial

Simply put, Node.js is JavaScript running on the server side.

Node.js is a platform built on the Chrome JavaScript runtime.

Node.js is an event-driven I/O server-side JavaScript environment. Based on Google’s V8 engine, the V8 engine executes JavaScript very fast and has very good performance.

Node.js is a JavaScript framework and a runtime environment that runs JavaScript code outside the web browser.

Who should read this tutorial?

If you are a front-end programmer, you don’t know dynamic programming languages ​​like PHP, Python or Ruby, and then you want to create your own service, then Node.js is a very good choice.

Node.js is JavaScript running on the server side. If you are familiar with JavaScript, then you will easily learn Node.js.

Of course, if you are a back-end programmer and want to deploy some high-performance services, then learning Node.js is also a very good choice.

What you need to know before following this tutorial

Before continuing with this tutorial, you should know some basic computer programming terms. If you have learned programming languages ​​such as Javascript, PHP, Java, etc., it will help you understand Node.js programming faster.

First Node.js program: Hello World!

Here is our first Node.js program:

console.log (" Hello World");

Save the file, the file name is helloworld.js, and execute it with the node command:

node  - helloworld.js

After the program is executed, if it is normal, it will output Hello World in the terminal.

Interactive Mode

Open the terminal, type node to enter the command interactive mode, you can enter a code statement and execute it immediately and display the result, for example:

Program Output:-

> node -v
>node helloworld.js
Hello World

Node.js is well suited to use in:

  • Single page web application with Node.js development
  • Web server back-end
  • Mobile and desktop applications (including games)
  • Back end for machine learning systems or IoT devices

Using Raspberry Pi, you can use a high-performance JavaScript engine on the device without having to have it connected to the internet 24 hours a day continuously since all data processing will happen locally on your computer, tablet, or phone that you are using at any given time.

Is Node.js A Programming Language?

No, it is not. Node.js was written in JavaScript. It provides a runtime environment for JavaScript to code server-side while using Google’s V0 library.