- Hands-On Server-Side Web Development with Swift
- Angus Yeung
- 96字
- 2021-06-10 19:00:24
Adding custom routes in a Vapor project
In a typical model–view–controller architecture, you'll consciously separate data from the controller code that handles the data and from the view that represents a snapshot of the data. The data structure of your custom data is defined by its model. Routes are the endpoints for a client to query for the data:
In this chapter, you'll learn how to define the model of custom data used in a new application called myJournal, which is a server-side Swift power web application for personal journals.