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 VaporToolbox
import Vapor import Vapor
//try ASDF() let app = boot()
//throw "done"
let app = try boot().wait()
do { do {
try app.run().wait() try app.run().wait()

View File

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

View File

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