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:
2024-02-26 10:20:29 +01:00
parent 902bab14c7
commit 0ddbc437b9
40 changed files with 1237 additions and 1911 deletions

View File

@@ -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]);
}