Some checks failed
Test Suite / test (push) Has been cancelled
- Introduced `/api/tmdb` and `/api/collection/missing-locations` endpoints to the backend for improved media management. - Added a new `get_media_by_country` function in the collection API to fetch media items based on country codes. - Updated configuration to allow overriding *arr base URLs via environment variables for better flexibility. - Enhanced frontend with a new `MissingLocations` component and integrated it into the routing structure. - Improved the `CollectionMap` component to handle country selection and display media items accordingly. - Added testing dependencies in `requirements.txt` and updated frontend configuration for testing support.
34 lines
833 B
TypeScript
34 lines
833 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// Get backend URL from environment variables (for dev server proxy)
|
|
const backendHost = process.env.VITE_BACKEND_HOST || '127.0.0.1'
|
|
const backendPort = process.env.VITE_BACKEND_PORT || '8080'
|
|
const backendUrl = `http://${backendHost}:${backendPort}`
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
build: {
|
|
outDir: 'dist',
|
|
},
|
|
server: {
|
|
host: '0.0.0.0', // Allow access from other computers
|
|
port: parseInt(process.env.VITE_PORT || '5173'),
|
|
proxy: {
|
|
'/api': {
|
|
target: backendUrl,
|
|
changeOrigin: true,
|
|
},
|
|
'/admin': {
|
|
target: backendUrl,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: './src/test/setup.ts',
|
|
},
|
|
})
|