Skip to content

Commit

Permalink
Updated RateLimit package to use import syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
IGuy37 committed Jul 8, 2024
1 parent 0af31f4 commit 193f1af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { MongoClient, ObjectId } from 'mongodb';
import dotenv from 'dotenv';
import cors from 'cors';
import pg from 'pg';
import RateLimit from 'express-rate-limit';

dotenv.config();
const url = process.env.MONGO_DB_URL;
Expand All @@ -28,7 +29,6 @@ app.use(express.json());
app.use(cors());

// set up rate limiter: maximum of 60 requests per minute
const RateLimit = require('express-rate-limit');
const limiter = RateLimit({
windowMs: 60 * 1000, // 1 minute
max: 60, // max 5 requests per windowMs
Expand Down

0 comments on commit 193f1af

Please sign in to comment.