Node.js is open-source, cross-platform, and since its introduction in 2009, it got hugely popular and now plays a significant role in the web development scene.
It provides an event-driven, non-blocking (asynchronous) I/O and cross-platform runtime environment for building highly scalable server-side applications using JavaScript.
Both your browser JavaScript and Node.js run on Google chrome's V8 JavaScript runtime engine.
This engine takes your JavaScript code and converts it into a faster machine code. Machine code is a low-level code that the computer can run without needing to first interpret it.
Nodejs is majorly used for developing server-side web applications. It is not javascript frameworks, many of the Nodejs's basics modules are written in javascript.
Follow the below steps to install node js, Some of the below steps requires Admin access
npm install npm --global if necessaryLet's follow the basics program of programming and start by creating a program that will print hello mars on the console as output.
This code-snippet is as simple as it can be, Place the below code in a file called hello-mars.js.
//file-name : hello-mars.js
console.log('hello world');You can run the above file using the following command on Command prompt/Terminal:
node hello-mars.jsThe output of the above command:
I am Pavankumar, Having 8.5 years of experience currently working in Video/Live Analytics project.