What is NODE JS?

Before we talk about Node JS, you need to know what JavaScript is. JavaScript is a high quality interpreted language. Let me explain it in detail. Often this JavaScript is used to create websites. HTML, CSS, JavaScript are the primary forms of web design. And JavaScript works in the user's browser. So how do I run this JavaScript is the browser?

So what is this NodeJS? What is the relationship between NodeJS and JavaScript? NodeJS is open-source software. Anyone can use it for free. It is available for Windows, Mac, Linux, Unix, and many other operating systems. Anyone can download it from nodejs.org and use it.

This is a cross-platform JavaScript run time environment. So this NodeJS server is able to use the JavaScript browser. This means that NodeJS is used in the JavaScript server so you can execute it outside the JavaScript browser. Simply put, Server-Side JavaScript is what happens here.

So let's see how to run a JavaScript file in NodeJS.

First, let's create a folder on the desktop. Then create a file called myfirst.js inside it. So you can do this in Notepad.

Then write this code in it. So if you have basic JavaScript knowledge to understand this, Lacy.

Var http = require (why http);

http.createServer (function (req, res) {

res.writeHead (200, {content-type code: time text / html});

res.end (Hello World Code);

}). Listen (8080);

Then save it and open the Command Prompt.

Then locate it inside the folder. So you can lock using the CD command.

Then type the command node myfirst.js in CMD, Terminal and press enter.

Then you will see that Node Server is open in Terminal and running. Then open your browser and type http: // localhost: 8080 and press enter. Then you will see a tab called Hello World.

Now one can imagine that the browser will show it anyway. So when using Node Package Manager with Node Server, it is very clear when developing mobile applications. You can also use the Web Application Development Framework.

You really have to see how this works by spending some time on it...

Thank you...


Popular Posts


Follow Us