NSNirmal Sankalanainnirmalsankalana.hashnode.dev·Sep 29, 2024 · 4 min readA Comprehensive Guide to Using doT.jsdoT.js is a minimalistic yet powerful JavaScript templating engine designed for Node.js and browsers. Known for being extremely fast and concise, doT.js emphasizes performance, especially in environments like V8 and Node.js. It is a dependency-free l...00
NSNirmal Sankalanainnirmalsankalana.hashnode.dev·Sep 8, 2024 · 3 min readJavaScript and Node.js Naming ConventionsNaming stuff in JavaScript (JS) and Node.js isn’t just about looking cool. It helps avoid confusion, prevent errors, and make sure that when you or someone else looks at the code later, they get what’s going on. 1. Variables: The Backbone of Your Cod...00
NSNirmal Sankalanainnirmalsankalana.hashnode.dev·Sep 8, 2024 · 4 min readHow to Use .env with ES6 ModulesWhen building Node.js applications, it's common to store sensitive information like database credentials or API keys in environment variables. This is where the .env file, managed by the dotenv package, comes in handy. However, when using ES6 modules...00
NSNirmal Sankalanainnirmalsankalana.hashnode.dev·Aug 11, 2024 · 5 min readUnderstanding CJS and ESM Imports and ExportsAs JavaScript has evolved, its module system has also improved. Two primary module formats dominate the ecosystem: CommonJS (CJS) and ECMAScript Modules (ESM). Understanding these two formats is crucial for developers, especially when working with mo...00
NSNirmal Sankalanainnirmalsankalana.hashnode.dev·Jul 3, 2024 · 3 min readSetting Up MongoDB Replicas LocallyIn a typical production environment, MongoDB replicas are deployed across multiple machines to ensure high availability and data redundancy. However, there are scenarios, especially in development and testing, where you might want to set up a replica...00