What's and Why's of Node.js

What's and Why's of Node.js

Hello folks👋, in this blog I am going to explain what is Node.js and why it is created and Key benifits of Node.js.

Before jumping into what is Node.js we need to know a brief history of javascript, to understand why Node.js is created.

A brief history of javascript

Let us go back to 1995 when javascript is first created by Brendan Eich in 1995 to make web interactive.

It took Eich only 10 days to develop the scripting language, then known as Mocha.😮

So basically to create a website you need HTML for making web page, CSS for styling the web page and javascript to make website interactive. For example to create a dropdown, display animations, play audio or video, etc.

This means javascript is a client side scripting language.

How does Javascript run in browser?🤔

Every browser has its own Javascript engine, Javascript engine will run the javascript code in the browser.

One of the famous javascript engine is V8 which is used in Chrome and Chromium based browsers.

However, now Javascript is not limited to web browser. Using Node.js you can run the Javascript in your system also.

Introduction of Node.js

In 2009, through the initiative of Ryan Dahl, Node.js was introduced. So, Node.js is runtime environment where you can run javascript on a stand alone machine(outside of browser), which is built on Chrome's V8 JavaScript engine..

what does this mean? it means that, any JavaScript code that one writes will run in any system that has Node.js installed. Node.js allows you to run your JavaScript code on the server also, using HTTP modules.

This made it possible for a developer to create a full-stack Web application using only Javascript.

Key benifits of Node.js

  • It makes it possible to use JavaScript for both the front-end and back-end
  • The ever-growing NPM (Node Package Manager) gives developers multiple tools and modules to use.
  • Node.js is open-source and free
  • Node.js is cross-platform

etc

This was a quick introduction of Node.js. I’m going to publish about NPM(Node Package Manager) in my next article, make sure to give me a follow on Hashnode.

Thanks For reading!!!✌️