-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-env-loading.js
More file actions
47 lines (38 loc) · 1.19 KB
/
test-env-loading.js
File metadata and controls
47 lines (38 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env node
/**
* Test .env Loading - Überprüft ob Umgebungsvariablen korrekt geladen werden
*/
// Lade .env Umgebungsvariablen
require('dotenv').config();
console.log("🧪 Testing .env Variable Loading...");
console.log("=" .repeat(50));
// Überprüfe wichtige API-Keys
const envVars = [
'NOTION_API_KEY',
'NOTION_DATABASE_ID',
'MIRO_API_TOKEN',
'MIRO_API_KEY',
'MIRO_TEAM_ID',
'KITEGG_API_KEY'
];
let foundVars = 0;
envVars.forEach(varName => {
const value = process.env[varName];
if (value && value.trim() !== '') {
console.log(`✅ ${varName}: GESETZT (${value.substring(0, 10)}...)`);
foundVars++;
} else {
console.log(`❌ ${varName}: NICHT GESETZT`);
}
});
console.log("=" .repeat(50));
console.log(`📊 Gefundene Variablen: ${foundVars}/${envVars.length}`);
if (foundVars > 0) {
console.log("✅ .env Datei wird korrekt geladen!");
console.log("🚀 Export-Funktionen sollten jetzt funktionieren.");
} else {
console.log("⚠️ Keine API-Keys gefunden in Umgebungsvariablen.");
console.log("💡 Stellen Sie sicher, dass eine .env Datei existiert.");
}
console.log("\n🔍 Aktuelle .env Datei Suche in:");
console.log(" " + process.cwd());