From 836d491ff9c0b96ef8ca4c3cb5302433426ae27a Mon Sep 17 00:00:00 2001 From: Maxime Cannoodt Date: Sun, 20 Nov 2022 20:17:59 +0100 Subject: [PATCH] add proxy example --- .gitignore | 5 ++++- plugin | 2 +- proxy.js => proxy.example.js | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) rename proxy.js => proxy.example.js (77%) diff --git a/.gitignore b/.gitignore index 516e6b9..7d80488 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,7 @@ server/.env # production configuration docker-compose.server.yml -/letsencrypt \ No newline at end of file +/letsencrypt + +# Dev env configuration +proxy.js \ No newline at end of file diff --git a/plugin b/plugin index b04f948..4ead2c6 160000 --- a/plugin +++ b/plugin @@ -1 +1 @@ -Subproject commit b04f948e199bbc418f7d44620ec7507ef2ca3795 +Subproject commit 4ead2c609f30a2ad64b45bf9c19b4ba4e1de54e9 diff --git a/proxy.js b/proxy.example.js similarity index 77% rename from proxy.js rename to proxy.example.js index 64f4258..416a966 100644 --- a/proxy.js +++ b/proxy.example.js @@ -3,6 +3,8 @@ const { createProxyMiddleware } = require("http-proxy-middleware"); const app = express(); +const PORT = 5000; + app.use( "/api/", createProxyMiddleware({ @@ -19,5 +21,5 @@ app.use( }) ); -app.listen(5000); -console.log("Reverse proxy listening at http://localhost:5000"); +app.listen(PORT); +console.log(`Reverse proxy listening at http://localhost:${5000}`);