import { Server as HttpServer } from 'http';
import { SocketServer } from './socket';
import { terminal } from './terminal';

export const createSocketServer = (server: HttpServer) => {
  const socketServer = new SocketServer(server, {
    path: '/terminal',
    pingTimeout: 1000 * 60 * 60 * 24,
  });

  socketServer.use('terminal', terminal);
};
