feat: add creator info middleware from MiruroAPI

- Add src/middleware/creatorInfo.js (ESM adapted)
- Injects creator attribution (name, GitHub, Telegram, timestamp) into every JSON response
- Updates server.js to use addCreatorInfo middleware
- Updates CHANGELOG.md, README.md, and docs/architecture.md
This commit is contained in:
Shinei Nouzen
2026-07-04 15:31:59 +05:30
parent 5cf908fb1e
commit 5ca688ab45
5 changed files with 95 additions and 1 deletions
+4
View File
@@ -26,6 +26,7 @@ import { fileURLToPath } from "url";
import { dirname } from "path";
import { createApiRoutes } from "./src/routes/apiRoutes.js";
import { getCacheStats } from "./src/helper/cache.helper.js";
import { addCreatorInfo } from "./src/middleware/creatorInfo.js";
dotenv.config();
@@ -160,6 +161,9 @@ app.get("/api/cache/stats", (req, res) => {
res.json({ success: true, results: getCacheStats() });
});
// ---- FEATURE: Creator info middleware (injects attribution into all responses) ----
app.use(addCreatorInfo);
createApiRoutes(app, jsonResponse, jsonError);
// ══════════════════════════════════════════════════════════════