First part of backend rework
- Added the base data structure for the new database - Added the new routes for the new database - Reworked the users endpoints
This commit is contained in:
@@ -2,6 +2,7 @@ import rateLimit from 'express-rate-limit';
|
||||
import slowDown from 'express-slow-down';
|
||||
import http from 'http';
|
||||
import os from 'os';
|
||||
import { log } from './logManager';
|
||||
|
||||
const requestLimiter = rateLimit({
|
||||
windowMs: 60 * 1000,
|
||||
@@ -23,7 +24,7 @@ function checkSystemLoad(req, res, next) {
|
||||
const threshold = cores * 0.7;
|
||||
|
||||
if (load > threshold) {
|
||||
console.log('System load too high, please try again later');
|
||||
log('System load too high, please try again later');
|
||||
return res.status(503).send(http.STATUS_CODES[503]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user