feat(web): add WebSocket chat handler with message persistence
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import { promptsRouter } from './routes/prompts';
|
||||
import { pipelineRouter } from './routes/pipeline';
|
||||
import { assetsRouter } from './routes/assets';
|
||||
import { configsRouter } from './routes/configs';
|
||||
import { handleChat } from './ws/chat';
|
||||
|
||||
const app = express();
|
||||
const server = createServer(app);
|
||||
@@ -22,13 +23,7 @@ app.use('/api/pipeline', pipelineRouter);
|
||||
app.use('/api/assets', assetsRouter);
|
||||
app.use('/api/configs', configsRouter);
|
||||
|
||||
wss.on('connection', (ws) => {
|
||||
// Placeholder - will be replaced in Task 3.1
|
||||
console.log('WebSocket client connected');
|
||||
ws.on('message', (data) => {
|
||||
console.log('received:', data.toString());
|
||||
});
|
||||
});
|
||||
wss.on('connection', handleChat);
|
||||
|
||||
const PORT = 3001;
|
||||
initDb();
|
||||
|
||||
Reference in New Issue
Block a user