Express.js: Request ParametersRequest parameters are additional data attached in the request URL sent to the server. Server then provides customized response according to that parameter provided with request. Route Params It is extra info attached in request URL by using ':' symb...Jan 30, 2024·3 min read
Node.js: Basics of EventsJust like JavaScript has the event-driven programming technique for the browser side, Node.js has it on the server side. Events are used heavily in Node.js. Setting up the event is similar to the browser-side JavaScript: First, we need to listen to ...Nov 18, 2023·2 min read
Node.js: Promise and Async-AwaitCallback Hell Why do we even need Promise and Async-Await? They allow us to avoid the Callback Hell. When the number of nesting levels of functions increases, it becomes hard to read and manage the code. That pyramid code structure is what we refer t...Nov 17, 2023·5 min read
Node.js: Event LoopWhat is an Event Loop? By default, JS is designed to handle synchronous tasks only. Event Loop is a process by which Node.js handles asynchronous functions. Let's see a code example and see which line of code gets printed first: // Asynchronous Timer...Nov 10, 2023·7 min read
Node.js: npm & package.jsonWhat is NPM? It is the world's largest JavaScript package library. It has command-line tools to install and manage the packages. Once, you install Node.js on your computer, 'npm' comes with it. NPM commands are as follows: npm install [Installs pack...Nov 7, 2023·4 min read
Node.js: Built-in ModulesOS Module This module provides information about the operating system and computer specifications. // Importing built-in os module const os = require('os'); console.log(os.type()); // Tells base kernel of OS console.log(os.version()); ...Oct 31, 2023·3 min read
Introduction to Node.jsNodeJS It is a runtime environment to run JavaScript outside the browser. It allows JavaScript to be used on the server side and create awesome web apps. Even though we can still use JS functions like setInterval and setTimeout, we can't use browser ...Oct 30, 2023·2 min read