fix local dev websockets

This commit is contained in:
Henry Jameson 2021-01-13 21:28:34 +02:00
parent 8c82bb61f1
commit 835eaf33b1
2 changed files with 6 additions and 0 deletions

View file

@ -3,6 +3,11 @@ const path = require('path')
let settings = {}
try {
settings = require('./local.json')
if (settings.target && settings.target.endsWith('/')) {
// replacing trailing slash since it can conflict with some apis
// and that's how actual BE reports its url
settings.target = settings.target.replace(/\/$/, '')
}
console.log('Using local dev server settings (/config/local.json):')
console.log(JSON.stringify(settings, null, 2))
} catch (e) {