1

Page de statistiques

This commit is contained in:
2025-11-28 01:47:10 +01:00
parent 38926267a3
commit fd27dc7fb6
47 changed files with 3278 additions and 86 deletions

20
tools/lib/config.js Normal file
View File

@@ -0,0 +1,20 @@
const fs = require("fs/promises");
const path = require("path");
let cached = null;
async function loadToolsConfig(configPath = "tools/config.json") {
const resolved = path.resolve(configPath);
if (cached && cached.path === resolved) {
return cached.data;
}
const raw = await fs.readFile(resolved, "utf8");
const data = JSON.parse(raw);
cached = { path: resolved, data };
return data;
}
module.exports = {
loadToolsConfig,
};