mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-01 07:21:17 +00:00
fix: frontend failing and go reflex race condition
This commit is contained in:
parent
cbcc695f7c
commit
308c98b02a
@ -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 .
|
||||
|
||||
1
ui/dev-dist/registerSW.js
Normal file
1
ui/dev-dist/registerSW.js
Normal file
@ -0,0 +1 @@
|
||||
if('serviceWorker' in navigator) navigator.serviceWorker.register('/dev-sw.js?dev-sw', { scope: '/', type: 'classic' })
|
||||
@ -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: './',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user