This commit is contained in:
Rizky 2024-06-28 00:48:11 +07:00
parent a90a5fe4a2
commit 7627feb3c9
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ if (!(await existsAsync(dir("app/srv")))) {
if (!process.env.PORT) {
g.port = 3000;
const env = genEnv({ ...parseEnv(".env"), PORT: g.port });
const env = genEnv({
...parseEnv(".env"),
...parseEnv(dir("app/db/.env")),
PORT: g.port,
});
await Bun.write(".env", env);
} else {
g.port = parseInt(process.env.PORT);