Files
signal-platform/frontend/vite.config.ts
Dennis Thiessen 61ab24490d
Some checks failed
Deploy / lint (push) Failing after 7s
Deploy / test (push) Has been skipped
Deploy / deploy (push) Has been skipped
first commit
2026-02-20 17:31:01 +01:00

44 lines
1.0 KiB
TypeScript

/**
* Production Nginx configuration snippet for signal.thiessen.io:
*
* server {
* listen 443 ssl;
* server_name signal.thiessen.io;
*
* root /path/to/frontend/dist;
* index index.html;
*
* # SPA client-side routing — fallback to index.html
* location / {
* try_files $uri $uri/ /index.html;
* }
*
* # Proxy API requests to FastAPI backend
* location /api/v1/ {
* proxy_pass http://127.0.0.1:8000;
* proxy_set_header Host $host;
* proxy_set_header X-Real-IP $remote_addr;
* proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
* proxy_set_header X-Forwarded-Proto $scheme;
* }
* }
*/
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
build: {
outDir: 'dist',
},
server: {
proxy: {
'/api/v1/': {
target: 'http://127.0.0.1:8000',
changeOrigin: true,
},
},
},
});