Back to home

Blogs

Things I've written

May 7, 20266 min read

Handling File Uploads in Express with Multer

Introduction When it comes to web development, understanding HTTP content types is critical. One of the most important content types to be aware of is multipart/form-data. This format is used for uplo

ChaiCodeChaiaurcodeChaiCohort
May 7, 20265 min read

Storing Uploaded Files and Serving Them in Express

Introduction After uploading files to the server using Multer, the files are stored on the application’s disk (inside a folder like uploads). From there, we can serve them directly to the frontend, wh

ChaiCodeChaiaurcodeChaiCohort
May 7, 20264 min read

URL Parameters vs Query Strings in Express.js

Introduction When a user sends a request to the server, the route handler function receives two parameters: the request object and the response object, which we usually write as req and res. The req o

ChaiCodeChaiaurcodeChaiCohort
May 7, 20267 min read

Creating Routes and Handling Requests with Express

Introduction On the server side, when we start building an application, most of the time we spend creating and handling routes. In Express.js, creating routes and handling requests is very simple beca

ChaiCodeChaiaurcodeChaiCohort
May 7, 20266 min read

What is Middleware in Express and How It Works

Introduction If you have ever worked with Express.js, you have probably heard the term middleware. Middleware is simply a function that executes between receiving a request and sending a response. The

ChaiCodeChaiaurcodeChaiCohort