To begin with, let us first discuss the features of the node.js framework.
- Basically, Node.js is built on chrome’s V8 engine.
- It is open-source.
- Furthermore, it is single-threaded. It means all requests run within the same thread.
- Besides. it is highly scalable.
- It is very fast.
- Moreover, it requires no buffering.
- We can build server-side applications using Node.js.
- Furthermore, we can create real-time applications using Node.js.
Some of the prominent applications of Node.js have been seen on Netflix, Yahoo, Uber, LinkedIn, eBay, and Paypal.
How to Start Using Node.js?
In order to start working with Node.js, first of all, you need to download it from its official site and install it. Once it is installed, you can test it by printing its version by using the following command.
Some Basic Examples of NodeJS
The following code shows how to display a text message on the console. You need to create a file with .js extension. Let us name this file welcome.js.
console.log("Welcome to the Programmingempire.com");
In order to run the above code, we use the following command.
So, this is how you can write simple programs in NodeJS. However, we use NodeJS for server-side programming. So, let us write a simple program to create a server in NodeJS.