An Express application
Now that we have an idea about the basics of Express routing and setup, let's build a two-page application that handles a user login form. Along the way, we will learn about how Express renders application HTML pages, how they can be combined with a generic layout page, and how to serve static files such as CSS and icons. We will also discuss how to handle form input, and how to use session data.
Our current route handlers are returning simple messages to the browser. In a real-world application, however, we will need to render complete HTML pages, with a standard HTML structure, including links to CSS stylesheets if necessary, and a header section. Express uses a template engine that allows us to specify the HTML we need for each page, and also provides the mechanism of injecting run-time values into these templates, similar to the template mechanisms of Angular, React, or Vue.
Express supports many different templating engines...