- backend: SSE endpoint /api/messages/stream backed by Redis pub/sub - backend: read real client IP via getConnInfo (fallback for x-forwarded-for) - backend: CORS allow any origin (dev: LAN access from phone) - frontend: useMessages subscribes via EventSource, auto-reconnect, merges new messages/replies live - frontend: vite host:true to expose dev server on LAN Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
17 lines
287 B
TypeScript
17 lines
287 B
TypeScript
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
host: true,
|
|
},
|
|
});
|