Skip to content

Commit 5cc72dc

Browse files
authored
Update knexfile.js
correct use of the connection parameters 😉
1 parent de496f0 commit 5cc72dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

knexfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const defaults = {
1010
connection: {
1111
user: connection.user || 'root',
1212
password: connection.password || '',
13-
host: connection.hosts[0].name,
14-
port: connection.port || 5432,
13+
host: connection.hosts && connection.hosts[0].name,
14+
port: (connection.hosts && connection.hosts[0].port) || 5432,
1515
database: connection.path[0],
1616
},
1717
migrations: {

0 commit comments

Comments
 (0)