diff options
| author | Henry Jameson <me@hjkos.com> | 2018-12-11 18:45:25 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-12-11 18:45:25 +0300 |
| commit | b839ba7870c2872607ebf3ae41a8c08f17a7dde7 (patch) | |
| tree | de8941179df23da234f46428a6b899c4e07d7c2e /config/index.js | |
| parent | fb5261b926adfb5b9bbe1bf55e36fe8b5f4eb57f (diff) | |
Quality of Frontend Developer's Life: here to stay
Diffstat (limited to 'config/index.js')
| -rw-r--r-- | config/index.js | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/config/index.js b/config/index.js index 7b0ef26c..56fa5940 100644 --- a/config/index.js +++ b/config/index.js @@ -1,5 +1,15 @@ // see http://vuejs-templates.github.io/webpack for documentation. -var path = require('path') +const path = require('path') +let settings = {} +try { + settings = require('./local.json') + console.log('Using local dev server settings (/config/local.json):') + console.log(JSON.stringify(settings, null, 2)) +} catch (e) { + console.log('Local dev server settings not found (/config/local.json)') +} + +const target = settings.target || 'http://localhost:4000/' module.exports = { build: { @@ -19,21 +29,22 @@ module.exports = { dev: { env: require('./dev.env'), port: 8080, + settings, assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: { '/api': { - target: 'http://localhost:4000/', + target, changeOrigin: true, cookieDomainRewrite: 'localhost' }, '/nodeinfo': { - target: 'http://localhost:4000/', + target, changeOrigin: true, cookieDomainRewrite: 'localhost' }, '/socket': { - target: 'http://localhost:4000/', + target, changeOrigin: true, cookieDomainRewrite: 'localhost', ws: true |
