A basic, test-ready Vapor template.
This template has everything ready to go. Just create a new project using Vapor toolbox.
vapor new MyApp --template=nodes-vapor/template-old
Due to the fact that Droplet.run
is a blocking call and that XCTest has difficulty testing Applications, the project is split up into two modules: App
and AppLogic
. App
contains the main.swift
and is used for building the main executable. AppLogic
is where all of your server's code will be and is the module used for tests. When you add a source file to your project please make sure it's a member of the AppLogic
module.
Vapor toolbox makes it simple to generate a project for Xcode.
vapor xcode -y
In Xcode, select the App
fig.1 scheme if you want to startup your server.
For testing, make sure to have the NodesVaporApp
fig. 2 selected.
Now, you can use ⌘U
like usual.
This package is developed and maintained by the Vapor team at Nodes. The package owner for this project is Steffen.
This package is open-sourced software licensed under the MIT license