Generate Vapor project.

This commit is contained in:
2025-01-06 08:23:36 -05:00
commit 2d7a613f44
16 changed files with 456 additions and 0 deletions

14
Sources/App/routes.swift Normal file
View File

@@ -0,0 +1,14 @@
import Fluent
import Vapor
func routes(_ app: Application) throws {
app.get { req async throws in
try await req.view.render("index", ["title": "Hello Vapor!"])
}
app.get("hello") { req async -> String in
"Hello, world!"
}
try app.register(collection: TodoController())
}