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:
parent
5b036bb8ec
commit
448293d6ac
2 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue