Summary
In this chapter, we have learned about three things that are common for a web application. The first one is learning how to make the Rocket application serve static files by using either PathBuf
or the FileServer
struct.
Another thing we have learned is how to use rocket_dyn_templates
to convert a template into a response to the client. We also learned about a template engine, Tera, and the various capabilities of the Tera template engine.
By utilizing static assets and templates, we can easily create modern web applications. In the next chapter, we are going to learn about user posts: text, picture, and video.