formatthing
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user