We will start with a new Vapor application, which will act as an API server for our iOS application. We will keep building on top of this application in the next few chapters to learn about different aspects of Vapor; towards the end, we will have a fully functional server that will serve as both an API and a web server, showing our Shopping List on the iOS app and also on the web.
To get started, we will begin with an official API template provided by Vapor. We will follow the following steps to Bootstrap our project and start coding it using Xcode:
- Open the Terminal and create a new API based Vapor application using the toolbox:
$ vapor new ShoppingListServer --template=ankurp/api-template
- This will create the new application based on the API template. Go into this folder in the Terminal and create an Xcode project file using the following command...