Summary
In this chapter, we have finally enabled our application to be used by a casual user as opposed to having to rely on a third-party application like Postman. We defined our own app views module that housed read file and insert functions. This resulted in us building a process that loaded an HTML file, inserted data from a JavaScript file and CSS file into the view data, and then serve that data.
This gave us a dynamic view that automatically updated when we edited, deleted, or created a to-do item. We also explored some basics around CSS and JavaScript to make API calls from the frontend to the backend to get the data needed to render the state of to-do items.
We also really explored how frontend assets are served which enabled us to embed our frontend into the Rust binary to be served by our Rust server. However, we are not going to stop there, in the next chapter, we are going to serve WASM into the frontend.