on master help sign in
added WS test
f0b0139ilyakooo0
Sources/App/configure.swift+6
unifiedsplit
@@ -54,6 +54,12 @@ 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+
57 services.register(ws, as: WebSocketServer.self)
63 services.register(ws, as: WebSocketServer.self)
58
64
59}
65}