made updates to load envs and streamline pg pool to cut down on connections (#15)

Reviewed-on: #15
Co-authored-by: Joseph Nelson <joseph.nelson4456@gmail.com>
Co-committed-by: Joseph Nelson <joseph.nelson4456@gmail.com>
This commit was merged in pull request #15.
This commit is contained in:
2026-05-30 23:52:32 -07:00
committed by joseph.nelson4456
parent 42563e6f7c
commit dca781418f
12 changed files with 23 additions and 44 deletions
+5 -1
View File
@@ -1,5 +1,7 @@
// config/index.js
export const database = {
import { Pool } from 'pg'
const database = {
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
@@ -7,6 +9,8 @@ export const database = {
port: parseInt(process.env.DB_PORT, 10),
}
export const pool = new Pool(database)
export const jwtEnv = {
secret: process.env.JWT_SECRET,
}