JS

NestJS: What, Why, and How

Introduction As the complexity of my Node.js projects increased, handling larger codebases got more difficult. The scaling process seemed sluggish and error-prone due to manual dependency wiring, fragmented structure, and a lack of robustness. Keeping clean, orderly codebases while incorporating additional libraries or services was...

by Sushant Goyal
Tag: nodejs
25-Sep-2024

JS

Unraveling the Power of gRPC: A Comprehensive Guide to the Protocol

In the dynamic landscape of distributed systems, communication between services is critical. As modern applications evolve, the need for efficient and scalable communication protocols becomes increasingly evident. One such protocol that has gained significant traction in recent years is gRPC. What is gRPC? gRPC, which stands...

by Aaditya Shukla
Tag: nodejs
22-Sep-2024

JS

Containerizing Your Node.js Server with Docker: Using Custom Docker Bridge Network

Introduction: Why Containerization Is Important In modern software development, containerization has become a standard practice, particularly for Node.js applications and microservices. But why is containerization so valuable? Consistency Across Environments: One of the main challenges in development is environment inconsistencies....

by Kunwar Anas Ali
Tag: nodejs
20-Sep-2024

JS

The Singleton Design Pattern in JavaScript: A Comprehensive Guide

Introduction What is the Singleton Design Pattern? The Singleton Design Pattern limits the instantiation of a class to only one instance. This is beneficial when a single object or shared resource is required to coordinate actions throughout the system. It's especially handy for managing shared resources or data across various instances...

by Abhimanyu Raizada
Tag: nodejs
23-Aug-2024

Database Administration

Mongo Monitor : Mongo Current Operations monitoring by lite application

Introduction In this blog, we have mentioned how we can monitor the current operations of MongoDB instances with a small application developed by us. Its light weight application was developed using Nodejs, HTML, and javascript. It's a very helpful application to monitor running queries on MongoDB and do the analysis on it: ...

by Akshay Prakash Chikane
Tag: nodejs
23-Aug-2024

Front End Development, MEAN

Future of MERN Stack?

Introduction MERN stack technology is a popular technology stack used by many developers worldwide. MERN is an acronym for four powerful technologies, including MongoDB, ExpressJS, ReactJS, and NodeJS. This technology stack is known for its ability to build fast and robust web applications. It is no surprise that the MERN stack is...

by Vijay Pratap Singh
Tag: nodejs
24-Aug-2023

Front End Development, MEAN

Why and how finally{…} block is NOT meaningless

A definition first (from the internet): try-catch-finally is used to handle runtime errors and prevent them from halting the execution of a program. The finally block triggers regardless of: what is implemented inside the try-catch block any errors encountered inside try-catch block any return statement written...

by Shivang Chaturvedi
Tag: nodejs
25-Jan-2023

MEAN, Node.js

Top level await() without async() function in NodeJs

Here’s how async-await function typically works: function myDummyBackendCall() { return new Promise((resolve) => { setTimeout(() => { resolve({ name: "Shivang", id: "asmdhajkdhajdsh8qweuqoweuiqepoi-0q-0eueiuaisjdaKcjaisku", }); }); }); } // Used an async wrapper function to make an await call (async () => { ...

by Shivang Chaturvedi
Tag: nodejs
24-Jan-2023

AWS, DevOps

Image Optimization Using Jpegtran with AWS Lambda

Image optimization is an important thing when designing a website. Through image optimization using the open source Jpegtran, one can reduce their image size while preserving their visual quality, which is also known as lossless compression. This results in saving many bytes or KB. Upgraded pictures utilizing Jpegtran likewise increment...

by Gaurav Rishi
Tag: nodejs
10-Jul-2017

Java/JVM, Node.js

MONGOOSE Tips and Tricks for Uncommon Cases

Mongoose is an object modelling package for Node that essentially works like an ORM for many popular languages much like Hibernate is for JAVA. Below are some of the mongoose special scenario(s) I stepped upon while working on the project. It took me some time to figure it out. Hopefully below details would prove helpful to you thereby...

by Rachit Jain
Tag: nodejs
27-Jun-2017

Node.js

How to Create a Addon in Nodejs

Writing your backend API in server side JavaScript is great, and we always do such kind of work using some predefined built-in library but if you want to use a function which is not feasible to use in Node.js or no module is available for that in node package manager but it is available in C/C++ libraries. So addons will help us to use...

by Mayank Tyagi
Tag: nodejs
21-Dec-2016

Technology

Too Many Indexes May kill your DB performance

Everyone thinks of creating index, but nobody pays attention towards removing them once they are created and not required .Too many indexes or unnecessary index can degrade your DB performance. To Optimize indexes in mongo we need to understand following things : How indexes works in mongoDB: Let’s say we have created compound...

by Pawan Kumar Goyal
Tag: nodejs
10-Aug-2016