Skip to content

Commit

Permalink
add proxy example
Browse files Browse the repository at this point in the history
  • Loading branch information
mcndt committed Nov 20, 2022
1 parent 9931c70 commit 836d491
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ server/.env

# production configuration
docker-compose.server.yml
/letsencrypt
/letsencrypt

# Dev env configuration
proxy.js
2 changes: 1 addition & 1 deletion plugin
6 changes: 4 additions & 2 deletions proxy.js → proxy.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const { createProxyMiddleware } = require("http-proxy-middleware");

const app = express();

const PORT = 5000;

app.use(
"/api/",
createProxyMiddleware({
Expand All @@ -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}`);

0 comments on commit 836d491

Please sign in to comment.