mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 14:54:33 +00:00
27 lines
611 B
TypeScript
27 lines
611 B
TypeScript
import fs from "fs";
|
|
import path from "path";
|
|
import defaultConfig, { Config } from "./default-config";
|
|
|
|
const customConfigPath = path.resolve(process.cwd(), "custom-config.js");
|
|
|
|
let customConfig: Partial<Config> = {};
|
|
|
|
if (fs.existsSync(customConfigPath)) {
|
|
import(customConfigPath)
|
|
.then((module) => {
|
|
customConfig = module.default;
|
|
})
|
|
.catch((error) => {
|
|
console.warn("Error loading custom configuration:", error);
|
|
});
|
|
} else {
|
|
console.info("No custom configuration file found!");
|
|
}
|
|
|
|
const config: Config = {
|
|
...defaultConfig,
|
|
...customConfig,
|
|
};
|
|
|
|
export default config;
|