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

fix: use inbuilt frontend dev server to proxy API instead of Nginx
This commit is contained in:
Kailash Nadh 2020-10-04 15:09:41 +05:30 committed by GitHub
commit 03338d5856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

2
frontend/.env.sample vendored Normal file
View File

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

View File

@ -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"
}
}
}
};