first commit

This commit is contained in:
Christoph Hagen
2021-11-25 19:15:38 +01:00
commit cdd5093c05
10 changed files with 183 additions and 0 deletions

View File

View File

@ -0,0 +1,10 @@
import Vapor
// configures your application
public func configure(_ app: Application) throws {
// uncomment to serve files from /Public folder
// app.middleware.use(FileMiddleware(publicDirectory: app.directory.publicDirectory))
// register routes
try routes(app)
}

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

@ -0,0 +1,11 @@
import Vapor
func routes(_ app: Application) throws {
app.get { req in
return "It works!"
}
app.get("hello") { req -> String in
return "Hello, world!"
}
}