29 lines
770 B
JavaScript
29 lines
770 B
JavaScript
/**
|
|
* Einfacher Test: Lädt config.local.json
|
|
*/
|
|
|
|
import { readFile } from "node:fs/promises";
|
|
import { fileURLToPath } from "node:url";
|
|
import { dirname, join } from "node:path";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
const configPath = join(__dirname, "..", "config.local.json");
|
|
|
|
console.log("Config Pfad:", configPath);
|
|
|
|
try {
|
|
const configData = await readFile(configPath, "utf-8");
|
|
console.log("\nRaw File Content:");
|
|
console.log(configData);
|
|
|
|
const config = JSON.parse(configData);
|
|
console.log("\nParsed Config:");
|
|
console.log(JSON.stringify(config, null, 2));
|
|
|
|
console.log("\n✓ Config erfolgreich geladen!");
|
|
} catch (error) {
|
|
console.error("\n❌ Fehler:", error.message);
|
|
console.error(error);
|
|
}
|