add proxy example
This commit is contained in:
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
Submodule plugin updated: b04f948e19...4ead2c609f
@@ -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}`);
|
||||
Reference in New Issue
Block a user