feat: Implement LiveCode module with WebSocket and SSE support
- Added config management using `useConfig` for environment variables. - Created `LiveCode` class to manage WebSocket connections and routing. - Implemented `SSEManager` for Server-Sent Events handling. - Developed `WSSManager` for managing WebSocket connections with heartbeat functionality. - Introduced `ReconnectingWebSocket` class for robust WebSocket client with automatic reconnection. - Added test files for live application demonstrating WebSocket and TCP server integration.
This commit is contained in:
@@ -165,7 +165,11 @@ export const initLightCode = async (opts: opts) => {
|
||||
} else {
|
||||
ctx.throw(runRes2.error || 'Lightcode 路由执行失败');
|
||||
}
|
||||
}).addTo(app);
|
||||
}).addTo(app, {
|
||||
override: false,
|
||||
// @ts-ignore
|
||||
overwrite: false
|
||||
});// 不允许覆盖已存在的路由
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user