3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 18:25:03 +00:00

env fixes for web platform hosting

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2023-03-31 16:35:35 +00:00 committed by GitHub
parent 5b036bb8ec
commit 448293d6ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -52,11 +52,11 @@ const envType = z.object({
DB_DATABASE: z.string().optional().default("zeppelin"),
});
let toValidate = {};
let toValidate = { ...process.env };
const envPath = path.join(rootDir, ".env");
if (fs.existsSync(envPath)) {
const buf = fs.readFileSync(envPath);
toValidate = dotenv.parse(buf);
toValidate = { ...toValidate, ...dotenv.parse(buf) };
}
export const env = envType.parse(toValidate);