diff --git a/README.md b/README.md index b86447b4..a02fa32c 100644 --- a/README.md +++ b/README.md @@ -17,23 +17,24 @@ to use pg-pool you must first create an instance of a pool ```js var Pool = require('pg-pool') -//by default the pool uses the same -//configuration as whatever `pg` version you have installed +// by default the pool uses the same +// configuration as whatever `pg` version you have installed var pool = new Pool() -//you can pass properties to the pool -//these properties are passed unchanged to both the node-postgres Client constructor -//and the node-pool (https://github.com/coopernurse/node-pool) constructor -//allowing you to fully configure the behavior of both +// you can pass properties to the pool +// these properties are passed unchanged to both the node-postgres Client constructor +// and the node-pool (https://github.com/coopernurse/node-pool) constructor +// allowing you to fully configure the behavior of both var pool2 = new Pool({ database: 'postgres', user: 'brianc', password: 'secret!', port: 5432, ssl: true, - max: 20, //set pool max size to 20 - min: 4, //set min pool size to 4 - idleTimeoutMillis: 1000 //close idle clients after 1 second + max: 20, // set pool max size to 20 + min: 4, // set min pool size to 4 + idleTimeoutMillis: 1000, // close idle clients after 1 second + connectionTimeoutMillis: 1000, // return an error after 1 second if connection could not be established }) //you can supply a custom client constructor