Home
/
risinglegends.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97a6243
)
swap to using env file
author
xangelo
<git@xangelo.ca>
Thu, 1 Jun 2023 16:35:53 +0000
(12:35 -0400)
committer
xangelo
<git@xangelo.ca>
Thu, 1 Jun 2023 16:35:53 +0000
(12:35 -0400)
src/server/lib/db.ts
patch
|
blob
|
history
diff --git
a/src/server/lib/db.ts
b/src/server/lib/db.ts
index 179cdca9647eb2fbaf898d780fe0807d2aeceeb8..4402c5a40f9dfe41360f385ff63f2d888ad9fc0c 100644
(file)
--- a/
src/server/lib/db.ts
+++ b/
src/server/lib/db.ts
@@
-1,11
+1,14
@@
import knex from "knex";
+import { config as dotenv } from 'dotenv';
+
+dotenv();
export const db = knex({
client: 'pg',
connection: {
host: 'localhost',
- user:
'postgres'
,
- password:
'root'
,
- database:
'tiny_kingdom'
+ user:
process.env.PG_USER
,
+ password:
process.env.PG_PASSWORD
,
+ database:
process.env.PG_DATABASE
}
});