Add steps to get AppLogic target working

This commit is contained in:
Josh Justice 2017-04-25 09:55:38 -04:00
parent 057f45741d
commit 9d310e109e
1 changed files with 4 additions and 1 deletions

View File

@ -12,13 +12,16 @@ Testing a Vapor app gets tricky, and requires some maneuvering of your app targe
To start, you need to split up your Vapor project into a target called `App`, and a target called `AppLogic`. The App module will only include a `main.swift`, and your `AppLogic` will contain the actual logic for the app.
Add a `Sources/AppLogic` folder to your project, then add `targets` to your `Package.swift`:
```swift
import PackageDescription
let package = Package(
name: “ProjectName”,
targets: [
Target(name: "App", dependencies: ["AppLogic"])
Target(name: "App", dependencies: ["AppLogic"]),
Target(name: "AppLogic")
],
dependencies: [
.Package(url: "https://github.com/vapor/vapor.git", majorVersion: 1, minor: 3)