add proxy example
This commit is contained in:
parent
9931c70af5
commit
836d491ff9
3
.gitignore
vendored
3
.gitignore
vendored
@ -14,3 +14,6 @@ server/.env
|
||||
# production configuration
|
||||
docker-compose.server.yml
|
||||
/letsencrypt
|
||||
|
||||
# Dev env configuration
|
||||
proxy.js
|
2
plugin
2
plugin
@ -1 +1 @@
|
||||
Subproject commit b04f948e199bbc418f7d44620ec7507ef2ca3795
|
||||
Subproject commit 4ead2c609f30a2ad64b45bf9c19b4ba4e1de54e9
|
@ -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}`);
|
Loading…
Reference in New Issue
Block a user