Browse Source

Merge pull request #199 from knadh/feat-inbuilt-dev-server

fix: use inbuilt frontend dev server to proxy API instead of Nginx
Kailash Nadh 4 years ago
parent
commit
03338d5856
2 changed files with 11 additions and 0 deletions
  1. 2 0
      frontend/.env.sample
  2. 9 0
      frontend/vue.config.js

+ 2 - 0
frontend/.env.sample

@@ -0,0 +1,2 @@
+LISTMONK_FRONTEND_PORT=8080
+LISTMONK_API_URL="http://127.0.0.1:9000"

+ 9 - 0
frontend/vue.config.js

@@ -14,4 +14,13 @@ module.exports = {
 
 
   productionSourceMap: false,
   productionSourceMap: false,
   filenameHashing: true,
   filenameHashing: true,
+
+	devServer: {
+    port: process.env.LISTMONK_FRONTEND_PORT || 8080,
+		proxy: {
+			"^/api": {
+				target: process.env.LISTMONK_API_URL || "http://127.0.0.1:9000"
+			}
+		}
+	}
 };
 };