REST API Design Made Simple with Express.js
Every application you use daily is talking to a server somewhere. When you open Instagram, your phone asks a server for your feed. When you place an order on Swiggy, your app sends your order details
Search for a command to run...
Every application you use daily is talking to a server somewhere. When you open Instagram, your phone asks a server for your feed. When you place an order on Swiggy, your app sends your order details
If you have read the previous blogs on blocking vs non-blocking code and the event loop, you already have the two most important building blocks for understanding this topic. Now it is time to bring e
You have been writing Express routes for a while now. Request comes in, your handler runs, response goes out. That flow feels natural. But then you start noticing patterns across your routes. Every pr
You have built POST endpoints before. JSON comes in, you read req.body, you do something with it, you send a response. Clean and straightforward. Then someone asks you to add a profile picture upload.
You are writing Express routes. GET requests, dynamic URLs, filtering data — all of it feels straightforward until you look at a real API and see two different things happening in the URL. /users/42 /
You built the file upload endpoint. Multer is configured, the route is working, files are coming in. You test it with Postman — status 200, no errors. Then you ask the next question: where did the fil
You have already written JavaScript. You know functions, objects, arrays. At some point you heard that you can run JavaScript on a server using Node.js — and that sounded interesting. So you tried it.
You already know what authentication is on the surface. You log in, you get access, you log out. Simple. But the moment you sit down to actually build it — you realize the question is not just "did th
You have been building web apps for a while. Login, logout, protected routes — you have wired them up. But at some point, someone on your team says "we should use JWT" or your backend returns a Set-Co