budibase/packages/server/src/websockets/index.ts

15 lines
419 B
TypeScript
Raw Normal View History

import http from "http"
import Koa from "koa"
import DataspaceSocket from "./dataspace"
import ClientAppSocket from "./client"
let clientAppSocket: ClientAppSocket
let dataspaceSocket: DataspaceSocket
export const initialise = (app: Koa, server: http.Server) => {
clientAppSocket = new ClientAppSocket(app, server)
dataspaceSocket = new DataspaceSocket(app, server)
}
export { clientAppSocket, dataspaceSocket }