just something to test

This commit is contained in:
Stephen
2019-11-04 21:03:48 -08:00
parent 931b897f65
commit 273510547c
114 changed files with 24958 additions and 59 deletions

View File

@@ -2,15 +2,10 @@ import Vapor
/// Register your application's routes here.
public func routes(_ router: Router) throws {
// "It works" page
router.get { req in
return try req.view().render("welcome")
router.get("/") { request in
return try request.view().render("home")
}
// Says hello
router.get("hello", String.parameter) { req -> Future<View> in
return try req.view().render("hello", [
"name": req.parameters.next(String.self)
])
router.get("/index.html") { request in
return try request.view().render("home")
}
}