feat(server): init nestjs server (#1997)

Co-authored-by: himself65 <himself65@outlook.com>
This commit is contained in:
LongYinan
2023-04-18 11:24:44 +08:00
committed by GitHub
parent a92d0fff4a
commit 91c3040db7
28 changed files with 4191 additions and 17575 deletions

View File

@@ -0,0 +1,15 @@
import { set } from 'lodash-es';
import { parseEnvValue } from './def';
for (const env in AFFiNE.ENV_MAP) {
const config = AFFiNE.ENV_MAP[env];
const [path, value] =
typeof config === 'string'
? [config, process.env[env]]
: [config[0], parseEnvValue(process.env[env], config[1])];
if (typeof value !== 'undefined') {
set(globalThis.AFFiNE, path, process.env[env]);
}
}