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

Merged
joseph.nelson4456 merged 3 commits from bug/programatically-load-envs into main 2026-05-30 23:52:34 -07:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 04521aed79 - Show all commits
+2 -2
View File
@@ -5,8 +5,8 @@
"main": "app.js",
"scripts": {
"dev": "nodemon src/app.js",
"start": "node src/app.js",
"docker:start": "node --env-file=.env src/app.js",
"start": "NODE_ENV=production node src/app.js",
"docker:start": "NODE_ENV=production node --env-file=.env src/app.js",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"migrate": "node-pg-migrate -m ./src/migrations",
+3 -1
View File
@@ -13,7 +13,9 @@ import collectionRoutes from './routes/collections/index.js'
import setRoutes from './routes/sets/index.js'
import itemRoutes from './routes/items/index.js'
loadEnvFile()
if (process.env.NODE_ENV !== 'test') {
loadEnvFile()
}
const app = express()
const port = process.env.PORT || 3000