What is Node JS?

Learn Node JS with Nodeman: Episode 2

In the last story, we had learned about the working of websites and servers and I told you that we will be creating our own server using Node JS. But the question arises, What Node JS is ?

Let me simplify that. JavaSript is a client-side language. Now I know many of you are wondering what just I said. What is client-side language? Okay, do you ever think if javascript is a programming language then there must be a compiler that compiles javascript code into machine language or binary code? Yes, there is a compiler called the V8 engine.

V8_JavaScript_engine_logo_2.svg.png

And this engine is present in chromes browser. And that's why you write your code in the browser and it gets executed over there. But wait is the V8 engine is only as engine as the JS code compiler. The answer is no, there are also some other compilers on a different browser. Like on Firefox browser there is SypderMonkey, and many more.

But don't you think it's too hectic, to write code on the browser and compile it there. And that is the reason why it is called client-side language because you are writing on your browser which means on the client's browser or client's servant (client's servant you will understand if you have read the previous article).

Ryan Dahl, an American software engineer, thought what if we can create an environment in your own PC so that instead of running your js code in the browser you can run it on your own system just like you run your c, c++ or java code.

rayn.jpg

And hence he developed Node JS using V8 engine and c++ to run JS code in your local system. With the birth of node js, people loved it for the development of the servers and hence it got the name of server-side language.

After this long story, it's time to install node js on your PC. Here's the official link to download Node JS.

2022-02-10 (1).png

I would recommend you to download the stable i.e recommended version.

After installation, you will see an interface something like this :

2022-02-10 (10).png

Note: You must check the terms and license agreement.

2022-02-10 (12).png

After then you simply have to do the next, next, and finally, install. After installing the software, you can verify whether it is installed successfully or not by running the given commands in your terminal.

node --version
npm --version

2022-02-10 (11).png

I will tell you about npm in the further upcoming articles. If you can see the versions, node js is successfully installed on your PC.

I think it's done for today. In the next article, we will write some code in node js. Till then ..

OIP.jpg