Skip to content

Commit 7fe07e5

Browse files
committed
fix: Ensure stateManager is required before configLoader
1 parent 531aae8 commit 7fe07e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
require('dotenv').config(); // Load environment variables from .env file
22

3+
// Import the state manager FIRST
4+
const stateManager = require('./state');
5+
36
// --- BEGIN Configuration Loading using configLoader ---
47
const { loadConfiguration, ConfigurationError } = require('./configLoader');
58

@@ -62,9 +65,6 @@ let pbsApiClients = {};
6265
const { fetchDiscoveryData, fetchMetricsData } = require('./dataFetcher');
6366
// --- END Data Fetching ---
6467

65-
// Import the state manager
66-
const stateManager = require('./state');
67-
6868
// Server configuration
6969
const DEBUG_METRICS = false; // Set to true to show detailed metrics logs
7070
const PORT = 7655; // Using a different port from the main server

0 commit comments

Comments
 (0)