Files
Convivo/apps/admin/vite.config.ts
T
Lago f7aea663d8 feat: add sidecar service for Sessionize sync
- Introduced a new Node HTTP service (sidecar) to sync event agendas from Sessionize into Convivo.
- Implemented two import paths: API sync and Excel import for session and speaker data.
- Added necessary database migrations for sessionize integration, including new columns and audit tables.
- Created functions for handling speaker and session imports, ensuring proper error handling and logging.
- Established row-level security and grants for new functions to restrict access to service-role only.
2026-08-24 20:47:29 +02:00

30 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// Dev server proxies /auth, /rest, /realtime, /storage to the local Supabase
// stack so the app can use relative URLs (works in Docker + localhost).
const SUPABASE_TARGET = 'http://127.0.0.1:54321';
export default defineConfig({
plugins: [react()],
server: {
host: true,
port: 3001,
proxy: {
'/auth': { target: SUPABASE_TARGET, changeOrigin: true },
'/rest': { target: SUPABASE_TARGET, changeOrigin: true },
'/realtime': { target: SUPABASE_TARGET, changeOrigin: true, ws: true },
'/storage': { target: SUPABASE_TARGET, changeOrigin: true },
'/functions': { target: SUPABASE_TARGET, changeOrigin: true },
// Sessionize sync sidecar (run `npm run sidecar:dev` to start it).
// Strip the /sidecar prefix so /sidecar/run -> http://127.0.0.1:3002/run
// (mirrors the nginx `location /sidecar/ { proxy_pass .../; }` rewrite).
'/sidecar': {
target: 'http://127.0.0.1:3002',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/sidecar/, ''),
},
},
},
});