on master help sign in
a
518db9filyakooo0
Sources/App/routes.swift+4
@@ -16,6 +16,10 @@ 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+
19 // Example of configuring a controller
23 // Example of configuring a controller
20 let todoController = TodoController()
24 let todoController = TodoController()
21 router.get("todos", use: todoController.index)
25 router.get("todos", use: todoController.index)