Add MariaDB integration and repositories

Introduce DB support and repos: add modules/database.js (connection pool + runDDL) and SQL DDL files (data/ddl/*) for servers, users, providers, identities and credentials. Add repository layers: users, servers, providers, identities, credentials. Update server.js to run DDL at startup. Update .env.example with DB settings and bump dependencies in package.json/package-lock.json (add mariadb, bump dotenv/helmet/path-to-regexp/zod and dev tool upgrades). Error handling and logging included for DDL and repo operations.
This commit is contained in:
2026-08-30 11:03:12 +02:00
parent f1a2850dc8
commit 7a87a98c82
15 changed files with 737 additions and 358 deletions
+12 -11
View File
@@ -17,25 +17,26 @@
"scripts": {
"start:dev": "nodemon .",
"start": "node .",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"homepage": "https://gitea.azures.fr/azures04/Base-REST-API",
"readme": "https://gitea.azures.fr/azures04/Base-REST-API/src/branch/main/README.md",
"dependencies": {
"colors": "^1.4.0",
"cors": "^2.8.5",
"dotenv": "^17.2.3",
"cors": "^2.8.6",
"dotenv": "^17.4.2",
"express": "^5.2.1",
"helmet": "^8.1.0",
"helmet": "^8.3.0",
"hpp": "^0.2.3",
"path-to-regexp": "^8.3.0",
"zod": "^4.2.0"
"mariadb": "^3.5.3",
"path-to-regexp": "^8.4.2",
"zod": "^4.4.3"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"eslint": "^9.39.2",
"globals": "^16.5.0",
"nodemon": "^3.1.11"
"@eslint/js": "^10.0.1",
"eslint": "^10.9.1",
"globals": "^17.11.0",
"nodemon": "^3.1.14"
}
}