@memberjunction/server 5.7.0 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts CHANGED
@@ -37,6 +37,7 @@ import { ExternalChangeDetectorEngine } from '@memberjunction/external-change-de
37
37
  import { ScheduledJobsService } from './services/ScheduledJobsService.js';
38
38
  import { LocalCacheManager, StartupManager, TelemetryManager, TelemetryLevel } from '@memberjunction/core';
39
39
  import { getSystemUser } from './auth/index.js';
40
+ import { GetAPIKeyEngine } from '@memberjunction/api-keys';
40
41
 
41
42
  const cacheRefreshInterval = configInfo.databaseSettings.metadataCacheRefreshInterval;
42
43
 
@@ -304,6 +305,10 @@ export const serve = async (resolverPaths: Array<string>, app: Application = cre
304
305
  await LocalCacheManager.Instance.Initialize(Metadata.Provider.LocalStorageProvider);
305
306
  console.log('LocalCacheManager initialized');
306
307
 
308
+ // Initialize APIKeyEngine singleton — reads apiKeyGeneration from mj.config.cjs automatically
309
+ // This must happen before any request handler calls GetAPIKeyEngine()
310
+ GetAPIKeyEngine();
311
+
307
312
  setupComplete$.next(true);
308
313
  raiseEvent('setupComplete', dataSources, null, this);
309
314