feat: setup database

This commit is contained in:
2024-08-17 16:10:26 +09:00
parent 53a4a08796
commit 0823070534
6 changed files with 1036 additions and 18 deletions
+18
View File
@@ -0,0 +1,18 @@
import pg from 'pg';
const { Pool } = pg;
import {
DB_USER,
DB_PASS,
DB_HOST,
PG_PORT,
DB_DATABASE,
} from '$env/static/private'
const connectionString = `postgres://${DB_USER}:${DB_PASS}@${DB_HOST}:${PG_PORT}/${DB_DATABASE}`;
const pool = new Pool({
connectionString: connectionString,
max: 2,
});
export default pool;