File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ export const emailConfig = {
21
21
} as const ;
22
22
23
23
export const databaseConfig = {
24
- port : parseInt ( process . env . DB_PORT as unknown as string ) ,
25
- host : process . env . DB_HOST ,
26
- username : process . env . DB_USERNAME ,
27
- password : process . env . DB_PASSWORD ,
28
- database : process . env . DB_DATABASE ,
24
+ port : parseInt ( process . env . DB_PORT || '5432' ) ,
25
+ host : process . env . DB_HOST || 'postgres' ,
26
+ username : process . env . DB_USERNAME || 'username' ,
27
+ password : process . env . DB_PASSWORD || 'password' ,
28
+ database : process . env . DB_DATABASE || 'database' ,
29
29
} as const ;
30
30
31
31
export const redisConfig = {
Original file line number Diff line number Diff line change @@ -6,12 +6,7 @@ const developmentEnvironmentOnly = appConfig.env === 'development';
6
6
7
7
const knexConfig : Knex . Config = {
8
8
client : 'pg' ,
9
- connection : {
10
- host : databaseConfig . host ,
11
- user : databaseConfig . username ,
12
- password : databaseConfig . password ,
13
- database : databaseConfig . database ,
14
- } ,
9
+ connection : `postgresql://${ databaseConfig . username } :${ databaseConfig . password } @${ databaseConfig . host } /${ databaseConfig . database } ` ,
15
10
migrations : {
16
11
extension : 'ts' ,
17
12
tableName : 'knex_migrations' ,
You can’t perform that action at this time.
0 commit comments