Building a REST API using Vapor

In the previous chapter, we covered several topics related to Vapor applications, such as how to extend the functionality of a Vapor application using Providers, and we dove into the Fluent provider as it is the most-used Provider in any Vapor application. It is also Vapor's and Swift's ORM to create, read, update, and delete data in the database using a high-level API. In this chapter, we will cover another important topic in building web applications that are related to routing, especially when building an API server.

Giving structure to our routes makes our applications easier to manage and easier for others to consume. There are several popular patterns in the industry when it comes to creating routes for ...

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.