gmazzei / VaporTutorial

Tutorial guide for the Vapor framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool







alt text







Quickstart

How to set up a Vapor 3 project

Main Tutorials


Source: Vapor University. Here you will find many tutorials regarding the basics of any Vapor project (important: check that the version of Vapor used in the tutorial is Vapor 3).

Code Samples

You can find them here.

Other Tutorials

Official Documentation

Vapor Docs

Swift Package Manager

Vapor uses Swift Package Manager, a tool that automates the process of downloading, compiling and linking dependencies.

Inside Package.swift you will find all the info related to dependencies. An example is shown below:

// swift-tools-version:4.0
import PackageDescription

let package = Package(
    name: "swift-training-backend",
    dependencies: [
        .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
        .package(url: "https://github.com/vapor/fluent-postgresql.git", from: "1.0.0"),
        .package(url: "https://github.com/vapor-community/pagination.git", from: "1.0.0")
    ],
    targets: [
        .target(name: "App", dependencies: ["Vapor", "FluentPostgreSQL", "Pagination"]),
        .target(name: "Run", dependencies: ["App"]),
        .testTarget(name: "AppTests", dependencies: ["App"])
    ]
)



About

Tutorial guide for the Vapor framework