Your next career begins with
Save 50% off your seat in our next iOS Bootcamp. Limited time only. Sessions start April 3.
Server-Side Swift with Vapor
Version history
Third Edition · iOS 13, Swift 5.2 - Vapor 4 Framework, Xcode 11.4 (Selected)
Mar 30 2021Third Edition - Early Acess 1 · iOS 13, Swift 5.2 - Vapor 4 Framework, Xcode 11.4
Jan 1 2020The definitive book on building web apps and web APIs using Server-Side Swift with Vapor, written by the creators of the Vapor 4 framework. By Logan Wright, Tim Condon & Tanner Nelson.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Who is this for?
This book is for iOS developers who already know the basics of iOS and Swift development and want to transfer that knowledge to writing server based applications.
Covered concepts
- HTTP
- Fluent
- Controllers
- Leaf
- Middleware
Learn how to build web apps and web APIs using Swift and the Vapor 4 framework!
If you’re a beginner to web development, but have worked with Swift for some time, you’ll find it’s easy to create robust, fully featured web apps and web APIs with Vapor 4.
Whether you’re...
moreLearn how to build web apps and web APIs using Swift and the Vapor 4 framework!
If you’re a beginner to web development, but have worked with Swift for some time, you’ll find it’s easy to create robust, fully featured web apps and web APIs with Vapor 4.
Whether you’re looking to create a backend for your iOS app, or want to create fully-featured web apps, Vapor is the perfect platform for you.
This book starts with the basics of web development and introduces the basics of Vapor; it then walks you through creating APIs and web backends; creating and configuring databases; deploying to Heroku, AWS, or Docker; testing your creations and more!
Before You Begin
This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book, and more.
Section I: Creating a Simple Web API
This section teaches you the beginnings of building Vapor applications, including how to use Swift Package Manager. You’ll learn how routing works and how Vapor leverages the power of Swift to make routing type-safe. You’ll learn how to create models, set up relationships between them and save them in a database. You’ll see how to provide an API to access this data from a REST client. Finally, you’ll build an iOS app which leverages this API to allow users to display and interact with the data.
Section II: Making a Simple Web App
This section teaches you how to build a front-end web site for your Vapor application. You’ll learn to use Leaf, Vapor’s templating engine, to generate dynamic web pages to display your app’s data. You’ll also learn how to accept data from a browser so that users can create and edit your models. This section will provide you the necessary building blocks to build a full website with Vapor.
Section III: Validation, Users & Authentication
This section shows you how to protect your Vapor application with authentication. You’ll learn how to add password protection to both the API and the website, which lets you require users to log in. You’ll learn about different types of authentication: HTTP Basic authentication and token-based authentication for the API, and cookie- and session-based authentication for the web site.
Finally, you’ll learn how to integrate with Google, Github and Apple’s OAuth providers. This allows you to delegate authentication and allow users to utilize their Google, Github or Apple account credentials to access your site.
These chapters will allow you to secure your important routes and keep only allowed routes as unauthenticated. You’ll also learn how to delegate the authentication duties to third party vendors while still keeping your application secure.
Section IV: Advanced Server-Side Swift
This section covers a number of different topics you may need to consider when developing server-side applications. These chapters will provide you the necessary building blocks to continue on your Vapor adventure and build even more complex and wonderful applications.
The chapters in this section deal with more advanced topics for Vapor and were written by the Vapor Core Team members. These include the use of Caching, Middleware and how to version your database / api including performing migrations.
Section V: Production & External Deployment
This section shows you how to deploy your Vapor application to external Cloud-based providers to offload the job of hosting your application. You’ll learn how to upload to Heroku, a popular platform for deploying applications as well as deploying to AWS or Docker.
The chapters in this section deal with hosting and production concerns when deploying your Vapor application and how to split your application into multiple services (microservices) to balance the load on your application.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development — plans start at just $19.99/month! Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.
Learn more