v1.14.0 - Vapor
This release adds support for running Vapor application on Vercel. To get started you need to add both Vercel
and VercelVapor
packages to your project:
.product(name: "Vercel", package: "Vercel"),
.product(name: "VercelVapor", package: "Vercel")
Then you can define a VaporHandler
like so:
import Vapor
import VercelVapor
@main
struct App: VaporHandler {
static func configure() async throws -> Application {
let app = Application()
app.get { _ in
"Hello, Vapor"
}
return app
}
}