changeset 329:71970f03c9e8

SPA: Fixed setup for proxy in "serve" dev server mode.
author Sascha Wilde <wilde@intevation.de>
date Fri, 03 Aug 2018 10:52:03 +0200
parents 003243ec5ce5
children fd04bccae6ca
files client/.env.sample client/vue.config.js
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/.env.sample	Fri Aug 03 10:27:34 2018 +0200
+++ b/client/.env.sample	Fri Aug 03 10:52:03 2018 +0200
@@ -3,6 +3,7 @@
 
 #Backend URL
 VUE_APP_API_URL=/api/
+BACKEND_API_URL=http://backend.example.com:8088
 
 #URL of secondary logo
 VUE_APP_SECONDARY_LOGO_URL=
--- a/client/vue.config.js	Fri Aug 03 10:27:34 2018 +0200
+++ b/client/vue.config.js	Fri Aug 03 10:52:03 2018 +0200
@@ -13,8 +13,8 @@
   },
   devServer: {
     proxy: {
-      "/api/*": {
-        target: "http://localhost:8000",
+      "/api": {
+        target: process.env.BACKEND_API_URL,
         secure: false
       },
       "/img/*": {