Session 20: Provider intelligence — quota tracker, gateway with fallback cascade, admin quota dashboard (1476 tests)

This commit is contained in:
Kev
2026-06-12 00:54:39 -04:00
parent 56392ec8f4
commit 9b10bb4138
17 changed files with 1422 additions and 15 deletions
+11
View File
@@ -1,4 +1,9 @@
const app = require('./app');
// Session 20 — surface which providers are actually configured at
// boot. A silently-missing key (e.g. ODDSPAPI_KEY unset in prod)
// otherwise only manifests when the gateway tries to fall over and
// finds no chain.
const { getConfiguredProviders, listProviderIds } = require('./config/providers');
// Default 3001 — Next.js owns 3000 locally and in production. The poller,
// internal cron, and BASE_URL conventions all assume 3001 for the Express
@@ -7,4 +12,10 @@ const PORT = process.env.PORT || 3001;
app.listen(PORT, () => {
console.log(`[VYNDR] Server running on port ${PORT}`);
const configured = getConfiguredProviders();
const missing = listProviderIds().filter((id) => !configured.find((c) => c.id === id));
console.log(`[VYNDR] providers configured (${configured.length}): ${configured.map((c) => c.id).join(', ') || 'none'}`);
if (missing.length) {
console.warn(`[VYNDR] providers missing keys: ${missing.join(', ')}`);
}
});