Skip to content

Commit 7320fee

Browse files
committed
Sample Application initialization in main now has the routes and filters.
1 parent f27aaa5 commit 7320fee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/App/main.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ let fileRoot = ""
1313
let filePath = "./config/ApplicationConfiguration.json"
1414
#endif
1515

16-
let app = Application(name: "Perfect", path: filePath)
16+
let app = Application(name: "Perfect",
17+
path: filePath,
18+
routes: Application.appRoutes(),
19+
filters: AppFilters(request: Application.requestFilters(),
20+
response: Application.responseFilters()))
1721

1822
do {
1923
try HTTPServer.launch(app.server())

0 commit comments

Comments
 (0)