feat: setup database
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user