mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-29 08:43:42 -04:00
[web-src] Allow the dev server to run against a remote forked-daapd instance
This commit is contained in:
parent
4188a54e37
commit
341acca184
2
web-src/.env.development
Normal file
2
web-src/.env.development
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VUE_APP_JSON_API_SERVER='http://localhost:3689'
|
||||||
|
VUE_APP_WEBSOCKET_SERVER='ws://localhost:3688'
|
@ -111,8 +111,14 @@ export default {
|
|||||||
protocol = 'wss://'
|
protocol = 'wss://'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var wsUrl = protocol + window.location.hostname + ':' + vm.$store.state.config.websocket_port
|
||||||
|
if (process.env.NODE_ENV === 'development' && process.env.VUE_APP_WEBSOCKET_SERVER) {
|
||||||
|
// If we are running in the development server, use the websocket url configured in .env.development
|
||||||
|
wsUrl = process.env.VUE_APP_WEBSOCKET_SERVER
|
||||||
|
}
|
||||||
|
|
||||||
var socket = new ReconnectingWebSocket(
|
var socket = new ReconnectingWebSocket(
|
||||||
protocol + window.location.hostname + ':' + vm.$store.state.config.websocket_port,
|
wsUrl,
|
||||||
'notify',
|
'notify',
|
||||||
{ reconnectInterval: 3000 }
|
{ reconnectInterval: 3000 }
|
||||||
)
|
)
|
||||||
|
@ -24,13 +24,13 @@ module.exports = {
|
|||||||
// localhost:3689
|
// localhost:3689
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://localhost:3689'
|
target: process.env.VUE_APP_JSON_API_SERVER
|
||||||
},
|
},
|
||||||
'/artwork': {
|
'/artwork': {
|
||||||
target: 'http://localhost:3689'
|
target: process.env.VUE_APP_JSON_API_SERVER
|
||||||
},
|
},
|
||||||
'/stream.mp3': {
|
'/stream.mp3': {
|
||||||
target: 'http://localhost:3689'
|
target: process.env.VUE_APP_JSON_API_SERVER
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user