
上QQ阅读APP看书,第一时间看更新
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.