hiling-opengraph/database.ts
2023-10-11 12:08:57 +07:00

14 lines
299 B
TypeScript

import { postgres, dotenv } from "./deps.ts"
const env = await dotenv.load();
const PgConn = postgres.default({
database: env["DB_NAME"],
port: Number(env["DB_PORT"]),
host: env["DB_HOST"],
username: env["DB_USERNAME"],
password: env["DB_PASSWORD"],
max: 10,
})
export default PgConn;