In the preceding chapter, we covered how to render HTML views with the help of Leaf, Swift's templating engine. We also made a middleware and used it to show HTML response for requests coming from the browser and JSON response for everything else, including our mobile app. By now, you should have a good understanding of how Vapor can be used to make both an API server and a web server.
In this chapter, we will focus on how to test our Vapor application server. We will also discuss how to write tests that run on both macOS and Linux. Also, we will discuss how to add Continuous Integration (CI) pipeline for our server app. This will trigger tests every time we have an event, from a submission of a Pull Request to our code on GitHub, or a merge to master branch of our repository. Using free services, such as Travis CI on open source projects, we will set up a...