MCPcopy Index your code
hub / github.com/simstudioai/sim / createRoomManager

Function createRoomManager

apps/realtime/src/index.ts:17–29  ·  view source on GitHub ↗
(io: SocketIOServer)

Source from the content-addressed store, hash-verified

15const SHUTDOWN_TIMEOUT_MS = 10000
16
17async function createRoomManager(io: SocketIOServer): Promise<IRoomManager> {
18 if (env.REDIS_URL) {
19 logger.info('Initializing Redis-backed RoomManager for multi-pod support')
20 const manager = new RedisRoomManager(io, env.REDIS_URL)
21 await manager.initialize()
22 return manager
23 }
24
25 logger.warn('No REDIS_URL configured - using in-memory RoomManager (single-pod only)')
26 const manager = new MemoryRoomManager(io)
27 await manager.initialize()
28 return manager
29}
30
31async function main() {
32 const httpServer = createServer()

Callers 1

mainFunction · 0.70

Calls 3

initializeMethod · 0.95
infoMethod · 0.80
warnMethod · 0.65

Tested by

no test coverage detected