In this session we will focus on Express.js as a framework for building HTTP APIs. Instead of writing everything from scratch in Node, we will use Express to structure routes, plug in middleware, and handle requests and responses in a predictable way – including using clear status codes and basic error handling.
- Preparation
- Session Plan (for mentors)
- Assignment
By the end of this session, you will be able to:
- Explain what Express is and describe why it is used for building backend applications.
- Implement routing in Express to handle
GETHTTP requests, endpoints and parameters. - Use logging and debugging tools to monitor and troubleshoot Node.js applications.
- Apply middleware functions in Express to process and transform requests and responses.
- Design and implement basic error handling for HTTP APIs using appropriate status codes.
- Use Postman to send requests to your Express API and inspect responses.