Skip to content

Commit

Permalink
Merge pull request #28 from alexmgriffiths/fix/27
Browse files Browse the repository at this point in the history
Adds issue #27 recommendations
  • Loading branch information
alexmgriffiths authored Apr 30, 2023
2 parents 3110b4f + 21c4854 commit 88d0cff
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions backend/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 backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"express-rate-limit": "^6.7.0",
"helmet": "^6.1.5",
"mysql2": "^3.2.4",
"ts-node": "^10.9.1",
Expand Down
4 changes: 4 additions & 0 deletions backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import express, { json } from 'express';
import cors from 'cors';
import helmet from 'helmet';
import apiController from './controllers/apiController';
import { rateLimit } from "express-rate-limit";

config();
setupSocket();

const app = express();

const limiter = rateLimit({windowMs: 1 * 60 * 1000, max: 25});
app.use(limiter);
app.use(json());
app.use(cors({origin: "*"}));
app.use(helmet());
Expand Down

0 comments on commit 88d0cff

Please sign in to comment.