Node Js hello world program
Hi friends, in this tutorial, you will learn how to run or execute your first node js hello world program. If you are wondering how to do this, then you have come to the right place. Before getting started with node js, let us discuss node js a little bit.
What is node js and why node js
Node js is open source and provides a server-side environment which means it used javascript on the server side instead of client-side and all the files are declared with .js extension. Node js can handle multiple requests at once and return the responses at the same time but other scripting languages such as PHP can not take multiple requests from the client machines simultaneously.
Also, read, the Node JS HTTP server example
Node js programs can be executed in two ways as given below.
- By using the command line interface i.e. cmd
- By using the vs code editor
Steps to run the node js hello world program using the command line interface
Step 1:- download node js from here and install it in your system.
Step 2:- Open the command line interface in your system.