diff --git a/.gitignore b/.gitignore index 6adac7f..8e65bcb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ node_modules/ *.log .env *.bak* +data/ +data/ diff --git a/server.js b/server.js index db0292c..c8912e1 100644 --- a/server.js +++ b/server.js @@ -11,7 +11,7 @@ const HOST = process.env.HOST || '127.0.0.1'; const PORT = process.env.PORT || 3030; // ─── Paths ─── -const DATA_DIR = path.join(__dirname, 'data'); +const DATA_DIR = process.env.DATA_DIR || path.join(__dirname, 'data'); const USERS_FILE = path.join(DATA_DIR, 'users.json'); const SERVICES_CACHE = path.join(DATA_DIR, 'services-cache.json'); const TOKENS_FILE = path.join(DATA_DIR, 'tokens.json'); @@ -184,7 +184,6 @@ async function syncServices() { // Build service map from inventory repos const newMap = {}; - const STATE_FILE = path.join(DATA_DIR, '../api/inventory-data.json'); // Also try to get the inventory state which has service URLs let stateData = {};