Adding a Provider

Let's switch over to the ShoppingListServer project now. Adding a Provider is simple and is done in a few steps. For that, we need to first update our Package.swift, add our Provider in our Config setup file and add any config files that are needed in the Config folder. The following are the specific steps that you need to take to add a Provider to your Vapor application:

  1. Open up the Package.swift file and add the Provider package to the dependencies section. Replace username with the github username that you used to publish your Swift package:
.package(url: "https://github.com/username/healthcheck-provider.git", .upToNextMajor(from: "1.0.0")),
  1. Under App target, add HealthcheckProvider as a dependency, along with other ...

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.