Javascript
34 articles
Health Checks and Graceful Shutdown of Expressjs App using Lightship
Expressjs is a fast, unopinionated, minimalist web framework for Node.js. Few functionalities like graceful shutdown, health checks etc are implicitly …
Mongoose Discriminator: The non DRY way to inherit schema properties
Mongoose Discriminator is another very useful and powerful yet underused feature of Mongoose. It serves as a means of schema inheritance, allowing you …
Understanding Mongoose Pre and Post middleware hooks
Pre and post middleware hooks is a very useful feature in Mongoose and provides a lot of flexibility during database operations like query, create, …
Optimize Mongoose Queries for Speed & Efficiency: The Lean Way
Mongoose is a schema-based solution to model your application data in MongoDB. It includes built-in type casting, validation, query building, business …
Deep dive into Object.freeze() in Javascript
According to MDN, the Object.freeze() static method freezes an object. Freezing an object prevents extensions and makes existing properties …
The Complete MacBook Setup Guide for Web Development
Setting up your development environment correctly is crucial for productivity and efficiency in web development. This comprehensive guide will walk …
A One Time Password (OTP) generator npm library based on nanoid
Mobile number has become the defacto user authentication mechanism in India and hence, OTP generation is a very common use case. otp-gen-agent is a …
Use NVM and .nvmrc for a better Javascript development
Node Version Manager (NVM) is an open source version manager for Node.js (Node) and allows to easily install & manage different versions of Node …
Async Operations with AbortController & AbortSignal in Nodejs
AbortController is the standard way to abort any ongoing operations. AbortController and AbortSignal are now part of Nodejs LTS (originally introduced …
Understand Sub-documents & Nested documents in Mongoose
Mongoose is the most widely schema-based solution to model your application data in MongoDB. It includes built-in type casting, validation, query …