You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
496 B
22 lines
496 B
import lodash from "lodash";
|
|
|
|
const defEnv: EnvConfig = {
|
|
serverHost: '0.0.0.0',
|
|
serverPort: 7791,
|
|
lccApiTarget: 'http://127.0.0.1:7779',
|
|
};
|
|
|
|
const allEnv: Record<string, Partial<EnvConfig>> = {
|
|
development: {},
|
|
production: {
|
|
lccApiTarget: 'http://127.0.0.1:8001',
|
|
serverPort: 3001,
|
|
},
|
|
};
|
|
|
|
for (const key in allEnv) {
|
|
const config = allEnv[key];
|
|
allEnv[key] = lodash.defaultsDeep(config, defEnv);
|
|
}
|
|
|
|
export default allEnv as Record<string, EnvConfig>;
|
|
|