Now that we know why server-side rendering is useful, let's implement it in our application. First, we will need to think about what we need to do to implement this functionality:
- Figure out which (sub)page was requested.
- Gather all the data required to render the page.
- Render the HTML using this data.
- Send this HTML to the client.
For this section, we will use the template code from chapter10_1.zip. This template adds a file on the server where we can implement server-side rendering without having to deal with the rest of the server code.