Hi folks. I've built a small app using NodeJs and Express to pull data
from an existing PostgreSQL DB using node-postgresql. There will only be 1
or 2 users connected connected at a time so I have been using the Instance
example instead of the Pooling example on the web site. It is working
great except I'm looking for a good example of how to handle when the
connection to the PostgreSQL database is lost. I would like to trap the
error and then set a timer to try a reconnection later. I am presuming
that the "client.on('error', function... would be the way to do this. Any
suggestions or pointers appreciated on the best way to handle a lost
database connection and keep the application running until a connection can
be re-established.
Thanks. Grant.
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/5b1eaefc-3ec3-4bc4-b404-1fcc54ff2e70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.