20 lines
345 B
Swift
20 lines
345 B
Swift
import Fluent
|
|
import Vapor
|
|
|
|
func routes(_ app: Application) throws {
|
|
app.get { req async in
|
|
"It works!"
|
|
}
|
|
|
|
app.get("hello") { req async -> String in
|
|
"Hello, world!"
|
|
}
|
|
|
|
let openApi = OpenApi()
|
|
openApi.registerRoutes(app)
|
|
|
|
try app.register(collection: InfodeskController())
|
|
|
|
print(app.routes.all)
|
|
}
|