on master help sign in
added WS test
commitf0b0139030a8dcd00ac68969d1e5cded16803909 authorilyakooo0 <ilyakooo0@gmail.com> dateSun 25 Nov 2018, 00:47 (8 years ago) parent518db9f
1 file changed+6
unifiedsplit
Sources/App/configure.swift+6
Sources/App/configure.swift+6
@@ -54,6 +54,12 @@ public func configure(_ config: inout Config, _ env: inout Environment, _ servic
5454 }
5555 }
5656
57+ ws.get("test") { (ws, req) in
58+ ws.onText({ (ws, text) in
59+ ws.send("pong")
60+ })
61+ }
62+
5763 services.register(ws, as: WebSocketServer.self)
5864
5965}