connect-pg
connect-pg copied to clipboard
PostgreSQL session store for Connect
It turned out that connect-pg did not work with express 4.x, so I've tried to fix that. The new code should be compatible with existing code. For express 4, express-session...
Highlight javascript code and fix bullet points.
Updates to support done(), which releases client back to pool in new node-postgres. https://github.com/brianc/node-postgres#client-pooling ``` javascript var pg = require('pg'); var conString = "postgres://postgres:1234@localhost/postgres"; pg.connect(conString, function(err, client, done) { if(err)...
As of version 1.0 of node-postgres, the pg.connect callback now returns a 'done' callback which one needs to use to return the client object to the connection pool. ``` var...
``` this.getClient(function(err, client, done) { if (err) return fn(err); client.query('DELETE FROM ' + _this.table + ' WHERE sid = $2;', [ sid ], function(err) { done(); if (err) return fn(err);...