Add health websocket

This is used by some of our services.
This commit is contained in:
Asher
2021-01-28 12:47:50 -06:00
parent f136a60093
commit b13db3124b
3 changed files with 21 additions and 0 deletions

View File

@ -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 })