fix: frontend failing and go reflex race condition

This commit is contained in:
Camilo Lopez 2026-05-12 20:46:22 -05:00
parent cbcc695f7c
commit 308c98b02a
3 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
-s -r "(\.go$$|\.cpp$$|\.h$$|navidrome.toml|resources|token_received.html)" -R "(^ui|^data|^db/migrations)" -R "_test\.go$$" -- go run -race -tags netgo,sqlite_fts5 .
-s -r "(\.go$$|\.cpp$$|\.h$$|navidrome.toml|resources|token_received.html)" -R "(^ui|^data|^db/migrations)" -R "_test\.go$$" -- go run -tags netgo,sqlite_fts5 .

View File

@ -0,0 +1 @@
if('serviceWorker' in navigator) navigator.serviceWorker.register('/dev-sw.js?dev-sw', { scope: '/', type: 'classic' })

View File

@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa'
const frontendPort = parseInt(process.env.PORT) || 4533
const backendHost = process.env.BACKEND_HOST || 'localhost'
const backendPort = frontendPort + 100
// https://vitejs.dev/config/
@ -26,7 +27,7 @@ export default defineConfig({
host: true,
port: frontendPort,
proxy: {
'^/(auth|api|rest|backgrounds)/.*': 'http://localhost:' + backendPort,
'^/(auth|api|rest|backgrounds)/.*': `http://${backendHost}:${backendPort}`,
},
},
base: './',