mirror of
https://github.com/coder/code-server.git
synced 2025-07-29 04:52:53 +08:00
Add health websocket
This is used by some of our services.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import * as express from "express"
|
||||
import * as expressCore from "express-serve-static-core"
|
||||
import * as http from "http"
|
||||
import Websocket from "ws"
|
||||
import * as pluginapi from "../../typings/pluginapi"
|
||||
|
||||
export const handleUpgrade = (app: express.Express, server: http.Server): void => {
|
||||
@ -48,3 +49,5 @@ export class WebsocketRouter {
|
||||
export function Router(): WebsocketRouter {
|
||||
return new WebsocketRouter()
|
||||
}
|
||||
|
||||
export const wss = new Websocket.Server({ noServer: true })
|
||||
|
Reference in New Issue
Block a user