add proxy example

This commit is contained in:
Maxime Cannoodt
2022-11-20 20:17:59 +01:00
parent 9931c70af5
commit 836d491ff9
3 changed files with 9 additions and 4 deletions

5
.gitignore vendored
View File

@@ -13,4 +13,7 @@ server/.env
# production configuration
docker-compose.server.yml
/letsencrypt
/letsencrypt
# Dev env configuration
proxy.js

2
plugin

Submodule plugin updated: b04f948e19...4ead2c609f

View File

@@ -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}`);