Add database configuration environment variables
This commit is contained in:
parent
ce30ca9d34
commit
ac7b7bb92c
10
lib/index.ts
10
lib/index.ts
|
@ -34,11 +34,11 @@ async function generate(): Promise<Page[]> {
|
||||||
|
|
||||||
const connection = await createConnection({
|
const connection = await createConnection({
|
||||||
"type": "postgres",
|
"type": "postgres",
|
||||||
"host": "localhost",
|
"host": process.env.DB_HOST || "localhost",
|
||||||
"port": 5432,
|
"port": process.env.DB_PORT ? parseInt(process.env.DB_PORT) : 5432,
|
||||||
"username": "blog",
|
"username": process.env.DB_USERNAME || "blog",
|
||||||
"password": "blog",
|
"password": process.env.DB_PASSWORD || "blog",
|
||||||
"database": "blog",
|
"database": process.env.DB_DATABASE || "blog",
|
||||||
"synchronize": true,
|
"synchronize": true,
|
||||||
"logging": true,
|
"logging": true,
|
||||||
"entities": [
|
"entities": [
|
||||||
|
|
Loading…
Reference in New Issue