mirror of
https://github.com/vapor/toolbox.git
synced 2025-04-20 11:59:32 +08:00
successfully running test command
This commit is contained in:
parent
1b45ec87c2
commit
9cce5f1b33
@ -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()
|
||||
|
@ -13,6 +13,7 @@ struct Test: Command {
|
||||
]
|
||||
|
||||
func run(using ctx: CommandContext) throws -> EventLoopFuture<Void> {
|
||||
print("test ran")
|
||||
return ctx.done
|
||||
}
|
||||
}
|
||||
|
@ -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 })
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user