Summary
In this chapter, we’ve looked at creating and leveraging our own middleware for session handling as well as enforcing JSON usage on our API. We’ve also reworked our project to use a common package layout to help separate our concerns and set ourselves up for future work and iteration.
Also in this chapter, we’ve introduced a number of helper functions, including two for creating and reporting errors and messages to the user via JSON and an API package to abstract our server handling, making it easy to understand and preparing us to accommodate CORS.
In the next chapter, we will discuss writing frontends in more detail and learn how to write frontend applications using a frontend framework.