mirror of
https://github.com/certd/certd.git
synced 2026-05-17 05:37:30 +08:00
chore: build
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import path from 'path';
|
||||
import _ from 'lodash';
|
||||
|
||||
const yaml = require('js-yaml');
|
||||
const fs = require('fs');
|
||||
|
||||
@@ -24,3 +25,12 @@ export function load(env = '') {
|
||||
_.merge(doc, parseEnv());
|
||||
return doc;
|
||||
}
|
||||
|
||||
export function mergeConfig(config: any, envType: string) {
|
||||
_.merge(config, load(envType));
|
||||
const keys = _.get(config, 'auth.jwt.secret');
|
||||
if (keys) {
|
||||
config.keys = keys;
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user