tianji/src/server/ws/index.ts

12 lines
275 B
TypeScript
Raw Normal View History

2023-09-18 08:08:16 +00:00
import { Server } from 'socket.io';
import { Express } from 'express';
import { createServer } from 'http';
export function initSocketio(app: Express) {
const httpServer = createServer(app);
const io = new Server(httpServer, {
// transports: ['websocket'],
});
}