mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-25 16:03:13 +00:00
include unix domain socket config object example
parent
2a42eac75a
commit
35ac068ab4
16
Client.md
16
Client.md
@ -63,7 +63,7 @@ Creates a new, unconnected instance of a Client configured via supplied configur
|
||||
- whether to try SSL/TLS to connect to server
|
||||
|
||||
|
||||
#### example
|
||||
#### tcp example
|
||||
|
||||
```javascript
|
||||
var client = new Client({
|
||||
@ -75,6 +75,20 @@ Creates a new, unconnected instance of a Client configured via supplied configur
|
||||
});
|
||||
```
|
||||
|
||||
#### domain socket example
|
||||
|
||||
Will look for the Unix Domain Socket at `/tmp/.s.PGSQL.5313` and connect with the rest of the supplied credentials:
|
||||
|
||||
```javascript
|
||||
var client = new Client({
|
||||
user: 'brianc',
|
||||
password: 'boom!',
|
||||
database: 'test',
|
||||
host: '/tmp',
|
||||
port: 5313
|
||||
});
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
<a name="method-connect"></a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user