Node.js – Global Object and Modules

Global Object In Node.js, a global object serves as a container for all global variables that are available in all modules of your application. Similar to the window object in browsers, the global object in Node.js provides access to various global functions and variables, such as console, setTimeout, and clearTimeout. To access the global object, … Read more

What is a Socket?

Socket “Socket” represents an end point for sending or receiving data in a network. In other words, it is the interface between the application and network communication on the operating system. Through sockets, applications can communicate with each other over the network. Sockets are the basis for many network applications and services, including web browsers, … Read more

Creating a server with Node.js

Creating a server without a library To create a server, you need the http/https object, which is built into the core of node.js, and we can import it as a module. There are two module options: http – Http is one of the built-in modules that comes with Node.js and allows creating a server to … Read more

Introduction to Node.js

What is node.js? JavaScript is a programming language that cannot be used independently, but for its execution a special environment is needed, the so-called. “JavaScript runtime environment”. The most famous “JavaScript runtime environment” is the browser, but if we want to execute JavaScript outside the browser, node.js appears on the scene as another “JavaScript runtime … Read more