mirror of https://github.com/vapor/docs.git
498 B
498 B
Configure
You configure the application in the configure.swift file. Here you can
register your own services, or override the ones provided by default.
import Vapor
public func configure(...) throws {
services.register {
let foo = FooService(...)
return foo
}
}
Later, after your application has booted, you can then request your registered service.
let foo = try app.make(FooService.self)