chore: Projektbasis und PostgreSQL-Migrationen einrichten
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
commit
10af6159b4
14 files changed
+2214
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { existsSync, writeFileSync } from "node:fs";
|
||||
import { randomBytes } from "node:crypto";
|
||||
|
||||
if (existsSync(".env")) {
|
||||
console.log(".env existiert bereits und wurde nicht veraendert.");
|
||||
} else {
|
||||
const password = randomBytes(24).toString("hex");
|
||||
writeFileSync(".env", [
|
||||
`DATABASE_URL=postgresql://kibu:${password}@127.0.0.1:55432/kibu`,
|
||||
`POSTGRES_PASSWORD=${password}`,
|
||||
"APP_TIMEZONE=Europe/Berlin",
|
||||
"SESSION_SECURE=false",
|
||||
"",
|
||||
].join("\n"), { flag: "wx" });
|
||||
console.log(".env mit zufaelligem lokalen Datenbankpasswort erstellt.");
|
||||
}
|
||||
Reference in new issue
Block a user