requireEnv('DATABASE_URL');

This commit is contained in:
phaichayon
2026-07-16 23:53:53 +07:00
parent affe25b5d1
commit 683bd11434
2 changed files with 2 additions and 4 deletions

View File

@@ -43,8 +43,7 @@ const DEFAULT_POSITIONS = [
];
async function main() {
const connectionString =
"postgres://postgres:admin1234@localhost:5432/training_system";
const connectionString = requireEnv("DATABASE_URL");
if (!connectionString) {
throw new Error("DATABASE_URL is required");

View File

@@ -3,8 +3,7 @@ const { hash } = require("bcryptjs");
const crypto = require("node:crypto");
async function main() {
const connectionString =
"postgres://postgres:admin1234@localhost:5432/training_system";
const connectionString = requireEnv("DATABASE_URL");
if (!connectionString) {
throw new Error("DATABASE_URL is required");