db created, added tests -- tentative
This commit is contained in:
13
backend/db/index.js
Normal file
13
backend/db/index.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import pg from 'pg';
|
||||
|
||||
const pool = new pg.Pool({
|
||||
connectionString: process.env.DATABASE_URL,
|
||||
});
|
||||
|
||||
export const query = (text, params) => pool.query(text, params);
|
||||
|
||||
export const getPool = () => pool;
|
||||
|
||||
export const close = () => pool.end();
|
||||
|
||||
export default pool;
|
||||
Reference in New Issue
Block a user