2023-03-05 19:57:05 +01:00
|
|
|
import http from "http"
|
|
|
|
import Koa from "koa"
|
2023-04-18 11:46:35 +02:00
|
|
|
import SpreadsheetSocket from "./spreadsheet"
|
2023-03-05 19:57:05 +01:00
|
|
|
import ClientAppSocket from "./client"
|
|
|
|
|
|
|
|
let clientAppSocket: ClientAppSocket
|
2023-04-18 11:46:35 +02:00
|
|
|
let spreadsheetSocket: SpreadsheetSocket
|
2023-03-05 19:57:05 +01:00
|
|
|
|
|
|
|
export const initialise = (app: Koa, server: http.Server) => {
|
|
|
|
clientAppSocket = new ClientAppSocket(app, server)
|
2023-04-18 11:46:35 +02:00
|
|
|
spreadsheetSocket = new SpreadsheetSocket(app, server)
|
2023-03-05 19:57:05 +01:00
|
|
|
}
|
|
|
|
|
2023-04-18 11:46:35 +02:00
|
|
|
export { clientAppSocket, spreadsheetSocket }
|