Load MemberJunction configuration from the filesystem
Searches for mj.config.cjs starting from the current directory and walking up the directory tree. Uses cosmiconfig for flexible configuration loading.
MJConfig object if found, null if not found or invalid
const config = loadMJConfig();if (config) { console.log(`Connecting to ${config.dbHost}:${config.dbPort || 1433}`);} Copy
const config = loadMJConfig();if (config) { console.log(`Connecting to ${config.dbHost}:${config.dbPort || 1433}`);}
Load MemberJunction configuration from the filesystem
Searches for mj.config.cjs starting from the current directory and walking up the directory tree. Uses cosmiconfig for flexible configuration loading.