mirror of
https://github.com/vapor/toolbox.git
synced 2025-05-16 02:33:28 +08:00
successfully running test command
This commit is contained in:
parent
1b45ec87c2
commit
9cce5f1b33
@ -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()
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 })
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user