#NodeJs
15 articles tagged with #NodeJs

Project: Build a Full-Stack To-Do App with React, Node.js and MongoDB
A full-stack to-do app is the perfect first MERN project — it covers every concept you'll use in production: REST APIs, database CRUD operations, JWT authentication, and deploying a frontend and backend separately. Build it once, understand the full stack.

Learn Node.js Through Building a Music API
Node.js is JavaScript on the server, and building a REST API for your music collection is the perfect first project. This guide covers Express routes, middleware, JSON responses, and deploying to a free hosting service — all by building an API for a music playlist.

Building REST APIs With Node.js and Express
Build a REST API with Node.js and Express by defining routes, handling JSON, and returning proper status codes. Here is how to structure one from scratch.

What Is Middleware in Express.js
Middleware in Express.js are functions that run between a request and its response, handling logging, auth, parsing, and errors. Here is how the chain works.

Building a CRUD API With Node.js
A CRUD API exposes create, read, update, and delete over HTTP. This guide builds one with Node.js and Express, mapping each operation to a REST endpoint.

Understanding Environment Variables in Node.js
Environment variables keep secrets and config out of your Node.js code. Learn how process.env, .env files, and dotenv work together to configure apps safely.

What Is npm and How Package Management Works
npm is the default package manager for Node.js, installing and versioning the libraries your project depends on. Here is how packages, package.json, and lockfiles work.

How to Structure a Node.js Project
A well-structured Node.js project separates routes, controllers, services, and models so code stays easy to find and test. Here is a layout that scales.

Types of Programming Languages: A Practical Overview
Programming languages are grouped by how they execute (compiled vs interpreted), how they express logic (procedural, object-oriented, functional), and what layer they operate at, from low-level hardware code to declarative scripting.

What Is the MERN Stack? A Practical Overview
The MERN stack is a set of four JavaScript technologies — MongoDB, Express, React, and Node.js — used together to build full web applications with a single language across front and back end. Here's how each piece fits.

Node.js Backend Development: Runtime, Modules, Servers
Node.js runs your JavaScript on a single thread with an event loop delegating I/O to the system, and that one design decision shapes every service you build on it. This guide covers the runtime model, the module systems, streams and shutdown behaviour that decide whether a Node service holds up in production.

How to find what is blocking the Node.js event loop
Latency that spikes across every endpoint at once is the signature of a blocked event loop, not a slow dependency. Measure loop delay to confirm it, capture a CPU profile of the blocked window to locate the synchronous frame, then move that work off the loop.

How to implement graceful shutdown in a Node.js service
Dropped requests during deploys are almost always ordering bugs. Learn the correct SIGTERM sequence: fail readiness so the load balancer drains you, stop accepting connections, finish in-flight work under a deadline, and only then close databases, queues and timers.

Migrating a Node.js project from CommonJS to ES modules
Three switches decide an ESM migration: the package type field, file extensions, and conditional exports. Everything else follows. Learn what breaks when require, __dirname and synchronous conditional loading disappear, and a migration order that keeps the main branch green.

Node.js streams and backpressure explained
Backpressure is what stops a stream pipeline from buffering an entire file in memory, and it is lost the moment you ignore what write returns or wire data events by hand. Learn how the mechanism works, why pipeline replaced pipe, and how to diagnose a stalling pipeline.