Skip to content

Commit

Permalink
added middleware for Event Badging
Browse files Browse the repository at this point in the history
  • Loading branch information
kaxada committed Jan 24, 2024
1 parent 771817c commit d82d3a8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const cors = require("cors");
const dbconnect = require("./database/helpers/dbconnect");
const routes = require("./routes/index.js");
require("dotenv").config();
const proxy = require("express-http-proxy");

const app = express();
app.use(bodyParser.urlencoded({ extended: true }));
Expand All @@ -16,6 +17,9 @@ app.use(
})
);

// Add a proxy middleware for Event Badging Bot
app.use("/api/event_badging", proxy("http://localhost:4040"));

routes.setupRoutes(app);

(async () => {
Expand Down
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-http-proxy": "^2.0.0",
"mongoose": "^7.4.1",
"mysql2": "^3.6.0",
"nodemailer": "^6.9.3",
Expand Down

0 comments on commit d82d3a8

Please sign in to comment.