Add database configuration environment variables

This commit is contained in:
Shadowfacts 2019-08-18 18:15:52 -04:00
parent ce30ca9d34
commit ac7b7bb92c
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 5 additions and 5 deletions

View File

@ -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": [