formatthing

This commit is contained in:
Stephen
2019-11-04 21:23:48 -08:00
parent 367dc246ff
commit 78c7dc0740
4 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
import Vapor 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 { public func app(_ env: Environment) throws -> Application {
var config = Config.default() var config = Config.default()
var env = env var env = env

View File

@@ -1,6 +1,6 @@
import Vapor import Vapor
/// Called after your application has initialized. // Called after your application has initialized.
public func boot(_ app: Application) throws { public func boot(_ app: Application) throws {
// Your code here // Your code here
} }

View File

@@ -1,7 +1,7 @@
import Leaf import Leaf
import Vapor 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 { public func configure(_ config: inout Config, _ env: inout Environment, _ services: inout Services) throws {
// Register routes to the router // Register routes to the router
let router = EngineRouter.default() let router = EngineRouter.default()

View File

@@ -1,6 +1,6 @@
import Vapor import Vapor
/// Register your application's routes here. // Register your application's routes here.
public func routes(_ router: Router) throws { public func routes(_ router: Router) throws {
router.get("/") { request in router.get("/") { request in
return try request.view().render("home") return try request.view().render("home")