HBHimanshu Balaniinblog.himanshubalani.com·May 10 · 7 min readStop Confusing Cookies, Sessions, and JWTs: The Definitive Guide to Authentication When I first tried to build a login system, I asked a senior developer what I should use. He said, "Just use cookies." Another developer overheard and said, "No, cookies are dead, use JWTs." A third c00
HBHimanshu Balaniinblog.himanshubalani.com·May 10 · 6 min readThe Assembly Line of the Web: Understanding Middleware in Express.jsWhen you first learn Express.js, you usually start by writing a simple route. A request comes in, your function runs, and a response goes out. It feels like a direct, one-to-one conversation between t00
HBHimanshu Balaniinblog.himanshubalani.com·May 10 · 6 min readHow to Store, Serve, and Secure Files in Express.js In my last post, we looked at how to get files off a user’s device and onto your server using Multer. But simply catching a file is only half the battle. Once that file lands on your filesystem, you h00
HBHimanshu Balaniinblog.himanshubalani.com·May 10 · 6 min readStop Crashing Your Server with Images: Handling File Uploads in Express with MulterYou’ve built a solid Express API. It accepts user registrations, parses JSON beautifully, and stores records in your database. Then, you decide to let users upload a profile picture. You add an <input00
HBHimanshu Balaniinblog.himanshubalani.com·May 10 · 5 min readThe URL Decoder Ring: URL Parameters vs Query Strings in Express.js Look at the URL of almost any major web application, and you will see a trail of breadcrumbs. Imagine you are browsing an e-commerce API. You might see a request that looks like this: GET /products/8900