Skip to content

Commit

Permalink
feat: use parse database connection URI
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Apr 14, 2017
1 parent 1f50449 commit 07a2065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const createConnection = async (
connectionConfiguration: DatabaseConfigurationType,
clientConfiguration: ClientConfigurationType = {}
): Promise<DatabaseSingleConnectionType> => {
const pool = new pg.Pool(connectionConfiguration);
const pool = new pg.Pool(typeof connectionConfiguration === 'string' ? parseConnectionString(connectionConfiguration) : connectionConfiguration);

const connection = await pool.connect();

Expand Down

0 comments on commit 07a2065

Please sign in to comment.