successfully running test command

This commit is contained in:
logan wri 2019-04-08 19:05:50 +02:00 committed by Logan Wright
parent 1b45ec87c2
commit 9cce5f1b33
3 changed files with 6 additions and 8 deletions

View File

@ -2,9 +2,7 @@ import Foundation
import VaporToolbox
import Vapor
//try ASDF()
//throw "done"
let app = try boot().wait()
let app = boot()
do {
try app.run().wait()

View File

@ -13,6 +13,7 @@ struct Test: Command {
]
func run(using ctx: CommandContext) throws -> EventLoopFuture<Void> {
print("test ran")
return ctx.done
}
}

View File

@ -3,7 +3,7 @@ import CloudCommands
import Globals
/// Creates an Application to run.
public func boot() -> EventLoopFuture<Application> {
public func boot() -> Application {
var services = Services.default()
var commands = CommandConfig()
@ -20,9 +20,8 @@ public func boot() -> EventLoopFuture<Application> {
// commands.use(LeafXcodeCommand(), as: "leaf")
// commands.use(LoadLeafPackage(), as: "info")
todo()
// services.register(commands)
services.register(CommandConfig.self, { _ in commands })
todo()
// return Application.asyncBoot(services: services)
return Application(configure: { services })
}