瀏覽代碼

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 年之前
父節點
當前提交
03338d5856
共有 2 個文件被更改,包括 11 次插入0 次删除
  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,
   filenameHashing: true,
+
+	devServer: {
+    port: process.env.LISTMONK_FRONTEND_PORT || 8080,
+		proxy: {
+			"^/api": {
+				target: process.env.LISTMONK_API_URL || "http://127.0.0.1:9000"
+			}
+		}
+	}
 };