Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

fix: use inbuilt frontend dev server to proxy API

Vivek R6c234f1b1d94
diff --git a/frontend/.env.sample b/frontend/.env.sample
new file mode 100644
index 00000000..367c37a8
--- /dev/null
+++ b/frontend/.env.sample
@@ -0,0 +1,2 @@
+LISTMONK_FRONTEND_PORT=8080
+LISTMONK_API_URL="http://127.0.0.1:9000"
diff --git a/frontend/vue.config.js b/frontend/vue.config.js
index a339bb9f..3a517bbd 100644
--- a/frontend/vue.config.js
+++ b/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"
+ }
+ }
+ }
};