mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
attach port always - ref brianc/node-postgres#604
This commit is contained in:
parent
92c1fede8e
commit
df2a24c555
2
index.js
2
index.js
@ -28,6 +28,7 @@ function parse(str) {
|
||||
config.fallback_application_name = result.query.fallback_application_name;
|
||||
}
|
||||
|
||||
config.port = result.port;
|
||||
if(result.protocol == 'socket:') {
|
||||
config.host = decodeURI(result.pathname);
|
||||
config.database = result.query.db;
|
||||
@ -39,7 +40,6 @@ function parse(str) {
|
||||
var auth = (result.auth || ':').split(':');
|
||||
config.user = auth[0];
|
||||
config.password = auth[1];
|
||||
config.port = result.port;
|
||||
|
||||
var ssl = result.query.ssl;
|
||||
if (ssl === 'true' || ssl === '1') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user