Chapter 3. Building an Express Web Application
This chapter will cover the proper way of building your first Express application. You'll begin by installing and configuring the Express module, and then learn about Express' main APIs. We'll discuss Express request, response, and application objects and learn how to use them. We'll then cover the Express routing mechanism and learn how to properly use it. We'll also discuss the structure of the application folder and how you can utilize different structures for different project types. By the end of this chapter, you'll learn how to build a full Express application. In this chapter, we'll cover the following topics:
- Installing Express and creating a new Express application
- Organizing your project's structure
- Configuring your Express application
- Using the Express routing mechanism
- Rendering EJS views
- Serving static files
- Configuring an Express session