November 2018
Intermediate to advanced
404 pages
10h 16m
English
Package.swift is the project's manifest file that describes all the packages your project relies on. It is always located in the root directory of a Vapor project:
// File: Package.swift
// swift-tools-version:4.0
import PackageDescription
let package = Package(
: "helloWorld", // [1]
: [ // [2]
// A server-side Swift web framework.
.package(: "https://github.com/vapor/vapor.git", : "3.0.0"), // [3]
// Swift ORM (queries, models, relations, etc) built on SQLite 3.
.package(: "https://github.com/vapor/fluent-sqlite.git", : "3.0.0-rc.2") // [4]
],
: [ // [5]
.target(: "App", : ["FluentSQLite", "Vapor"]),
.target(: "Run", : Read now
Unlock full access