#Setup

In this guide, we will be using Graphiti and setting up Vapor from scratch without using any template.

#Prerequisites

Obviously, Pioneer requires Swift installed. Swift can be installed for most operation systems, just follow the official guide from swift.org

PlatformToolchain
MacOSXcode 13.2
Ubuntu16.04 18.04 20.04
WindowsWindows 10

#Application

Setup the skeleton of the executable using Swift package manager by running:

swift package init --type executable

#Dependencies

Next, add all three main dependencies: Vapor, Graphiti and of course, Pioneer to your Package.swift.

Package.swift
import PackageDescription let package = Package( dependencies: [ .package(url: "https://github.com/GraphQLSwift/Graphiti.git", from: "1.0.0"), .package(url: "https://github.com/vapor/vapor.git", from: "4.61.1"), .package(url: "https://github.com/d-exclaimation/pioneer", from: "0.10.0") ], targets: [ .target( name: "...", dependencies: [ .product(name: "Pioneer", package: "pioneer"), .product(name: "Graphiti", package: "Graphiti"), .product(name: "Vapor", package: "vapor") ] ) ] )

#Basic application

Let's continue with setting up the basic Vapor application.

Go to your main.swift, add Vapor, and setup a simple Vapor application with no routing or any other configuration.

main.swift
import Vapor let app = try Application(.detect()) defer { app.shutdown() } try app.run()