Getting Started with Vapor

Check out the main Getting Started guide which covers Vapor specifically. This page is here mostly for consistency with the rest of the packages.

More in-depth information on the APIs included in Vapor, see the sub-sections to the left.

Package

If you don’t want to use one of Vapor’s templates to get started, you can always include the framework manually.

  1. // swift-tools-version:4.0
  2. import PackageDescription
  3. let package = Package(
  4. name: "Project",
  5. dependencies: [
  6. ...
  7. .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
  8. ],
  9. targets: [
  10. .target(name: "Project", dependencies: ["Vapor", ... ])
  11. ]
  12. )

Use import Vapor to access the APIs.