mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 05:36:06 +00:00
fallback to 'default' when NODE_ENV is undefined
This commit is contained in:
parent
7c0d5f575c
commit
6502821454
@ -170,7 +170,7 @@ const defaultConfig: IConfig = {
|
||||
};
|
||||
|
||||
export function read(): IConfig {
|
||||
const content = fs.readFileSync(`./config/${process.env.NODE_ENV}.yaml`, "utf8");
|
||||
const content = fs.readFileSync(`./config/${process.env.NODE_ENV || 'default'}.yaml`, "utf8");
|
||||
const parsed = load(content);
|
||||
const config = {...defaultConfig, ...(parsed as object)} as IConfig;
|
||||
return config;
|
||||
|
Loading…
Reference in New Issue
Block a user