on f05cfeb help sign in
Sources/App/configure.swift−6
since splitsnapshots
unifiedsplit
@@ -54,12 +54,6 @@ public func configure(_ config: inout Config, _ env: inout Environment, _ servic
54 }
54 }
55 }
55 }
56
56
57− ws.get("test") { (ws, req) in
58− ws.onText({ (ws, text) in
59− ws.send("pong")
60− })
61− }
62−
63 services.register(ws, as: WebSocketServer.self)
57 services.register(ws, as: WebSocketServer.self)
64
58
65}
59}
Sources/App/routes.swift−4
@@ -16,10 +16,6 @@ public func routes(_ router: Router) throws {
16 return postModel.getPost(for: try req.parameters.next(Int.self), on: req)
16 return postModel.getPost(for: try req.parameters.next(Int.self), on: req)
17 }
17 }
18
18
19− router.get("openSockets") { (req) in
20− return OpenSockets.sockets.count
21− }
22−
23 // Example of configuring a controller
19 // Example of configuring a controller
24 let todoController = TodoController()
20 let todoController = TodoController()
25 router.get("todos", use: todoController.index)
21 router.get("todos", use: todoController.index)