formatthing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import Vapor
|
||||
|
||||
/// Creates an instance of `Application`. This is called from `main.swift` in the run target.
|
||||
// Creates an instance of `Application`. This is called from `main.swift` in the run target.
|
||||
public func app(_ env: Environment) throws -> Application {
|
||||
var config = Config.default()
|
||||
var env = env
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Vapor
|
||||
|
||||
/// Called after your application has initialized.
|
||||
// Called after your application has initialized.
|
||||
public func boot(_ app: Application) throws {
|
||||
// Your code here
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Leaf
|
||||
import Vapor
|
||||
|
||||
/// Called before your application initializes.
|
||||
// Called before your application initializes.
|
||||
public func configure(_ config: inout Config, _ env: inout Environment, _ services: inout Services) throws {
|
||||
// Register routes to the router
|
||||
let router = EngineRouter.default()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Vapor
|
||||
|
||||
/// Register your application's routes here.
|
||||
// Register your application's routes here.
|
||||
public func routes(_ router: Router) throws {
|
||||
router.get("/") { request in
|
||||
return try request.view().render("home")
|
||||
|
||||
Reference in New Issue
Block a user