Skip to content

Commit

Permalink
feat: remove body-parser
Browse files Browse the repository at this point in the history
Signed-off-by: Raphael Arce <[email protected]>
  • Loading branch information
raphael-arce committed Aug 30, 2024
1 parent 3ce3a25 commit 334f5cb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"dependencies": {
"axios": "1.7.4",
"body-parser": "1.20.2",
"cors": "^2.8.5",
"express": "4.19.2",
"express-rate-limit": "7.4.0",
Expand Down
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import bodyParser from "body-parser";
import express from "express";
import basicAuthMiddleware from "./middleware/basic-auth-middleware";
import corsMiddleware from "./middleware/cors";
Expand All @@ -15,8 +14,7 @@ export const config: Config = parseConfig();
const app = express();
const port = 3000;

app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.json());
app.use(express.json({ limit: '10mb'}));
app.use(corsMiddleware(config));
app.use(rateLimitMiddleware(config));
app.use(basicAuthMiddleware(config));
Expand Down

0 comments on commit 334f5cb

Please sign in to comment.