| 1 | What is the difference between application-level, router-level, and route-specific middleware in Express? Node.js › Express & Middleware | Node.js | Express & Middleware | Intermediate |
| 2 | What does the express.json() and express.urlencoded() built-in middleware do, and why must it be registered before routes that need to read req.body? Node.js › Express & Middleware | Node.js | Express & Middleware | Intermediate |
| 3 | What is the purpose of the express.static() built-in middleware, and how would you use it to serve a folder of static assets? Node.js › Express & Middleware | Node.js | Express & Middleware | Beginner |
| 4 | What is middleware in Express, and what is the significance of the order in which middleware is registered? Node.js › Express & Middleware | Node.js | Express & Middleware | Intermediate |
| 5 | What is the purpose of the helmet middleware package for an Express application, and what specific security headers does it set? Node.js › Express & Middleware | Node.js | Express & Middleware | Intermediate |
| 6 | What is CORS middleware in Express, and how does the cors package simplify configuring Cross-Origin Resource Sharing? Node.js › Express & Middleware | Node.js | Express & Middleware | Intermediate |
| 7 | How do you write custom Express middleware that needs to perform asynchronous work, like checking a value against a database, before calling next()? Node.js › Express & Middleware | Node.js | Express & Middleware | Advanced |
| 8 | How would you implement request validation middleware in Express using a schema-validation library like Zod or Joi? Node.js › Express & Middleware | Node.js | Express & Middleware | Advanced |
| 9 | How would you implement a request-logging middleware in Express that captures method, path, status code, and response time for every request? Node.js › Express & Middleware | Node.js | Express & Middleware | Advanced |
| 10 | How would you implement conditional middleware in Express that only applies to certain requests based on a runtime condition? Node.js › Express & Middleware | Node.js | Express & Middleware | Advanced |
| 11 | How would you implement a global request timeout middleware in Express to prevent a slow request from hanging indefinitely? Node.js › Express & Middleware | Node.js | Express & Middleware | Advanced |
| 12 | What is Express.js, and what problem does it solve compared to using Node.js's raw http module directly? Node.js › Express & Middleware | Node.js | Express & Middleware | Beginner |
| 13 | What is the difference between res.send(), res.json(), and res.end() in Express, and when should each be used? Node.js › Express & Middleware | Node.js | Express & Middleware | Intermediate |
| 14 | How would you structure a large Express application using the Router to organize routes into feature-based or resource-based modules? Node.js › Express & Middleware | Node.js | Express & Middleware | Advanced |
| 15 | How would you implement a middleware that adds a correlation/request ID to every incoming request for tracing purposes across a distributed system? Node.js › Express & Middleware | Node.js | Express & Middleware | Advanced |
| 16 | What is the Middleware (Chain of Responsibility) pattern as implemented by Express, and how does the 'next()' function drive it? Node.js › Architecture & Design Patterns | Node.js | Architecture & Design Patterns | Intermediate |
| 17 | What is Role-Based Access Control (RBAC), and how would you implement it as Express middleware? Node.js › Authentication & Authorization | Node.js | Authentication & Authorization | Intermediate |
| 18 | What is a centralized error-handling middleware pattern in Express, and what advantages does it provide over handling errors in each individual route? Node.js › Error Handling | Node.js | Error Handling | Advanced |
| 19 | What is multipart/form-data, and why does a Node.js server need special middleware (like multer) to handle file uploads? Node.js › File Uploads & Media Processing | Node.js | File Uploads & Media Processing | Beginner |
| 20 | How would you create a basic HTTP server using only Node's built-in node:http module, without a framework like Express? Node.js › HTTP & HTTPS Modules | Node.js | HTTP & HTTPS Modules | Beginner |
| 21 | Why doesn't Express automatically catch errors thrown inside an async route handler in versions prior to Express 5, and how do you work around this? Node.js › Error Handling | Node.js | Error Handling | Intermediate |
| 22 | How would you implement a global 'not found' (404) handler in Express for any route that doesn't match a defined endpoint? Node.js › Error Handling | Node.js | Error Handling | Intermediate |
| 23 | What is a layered (n-tier) architecture in a Node.js/Express application, and what are its typical layers? Node.js › Architecture & Design Patterns | Node.js | Architecture & Design Patterns | Advanced |
| 24 | How do you write a custom IValidateOptions<T> implementation for validation logic beyond what DataAnnotations attributes can express? ASP.NET Core › Configuration & Options Pattern | ASP.NET Core | Configuration & Options Pattern | Advanced |
| 25 | How would you create a basic HTTP server in Node.js using only the built-in node:http module, without any framework? Node.js › HTTP & Web Servers | Node.js | HTTP & Web Servers | Beginner |
| 26 | What is Passport.js, and how do its 'strategies' provide a consistent authentication abstraction across different methods? Node.js › Authentication & Authorization | Node.js | Authentication & Authorization | Intermediate |
| 27 | What is CSRF (Cross-Site Request Forgery), and how do you protect a Node.js session-based application against it? Node.js › Authentication & Authorization | Node.js | Authentication & Authorization | Intermediate |
| 28 | How would you validate and restrict uploaded file types and sizes using multer to prevent malicious or oversized uploads? Node.js › File Uploads & Media Processing | Node.js | File Uploads & Media Processing | Intermediate |
| 29 | What is the difference between upload.single(), upload.array(), and upload.fields() in multer? Node.js › File Uploads & Media Processing | Node.js | File Uploads & Media Processing | Intermediate |
| 30 | What is the purpose of the HTTP OPTIONS method, and how does it relate to CORS preflight requests? Node.js › HTTP & Web Servers | Node.js | HTTP & Web Servers | Intermediate |
| 31 | How do JWTs, OAuth, and Passport.js fit together in a typical Node.js authentication architecture? Node.js › Authentication & Authorization (JWT, OAuth, Passport) | Node.js | Authentication & Authorization (JWT, OAuth, Passport) | Intermediate |
| 32 | How would you optimize a Node.js application's JSON serialization performance for API responses with very large or very frequent payloads? Node.js › Performance Optimization & Profiling | Node.js | Performance Optimization & Profiling | Advanced |