Next: , Previous: , Up: Upgrading from Trip Server v1   [Contents][Index]


3.1 Database URI

There are some differences between what the Node.js pgmodule will accept and those defined as the PostgreSQL libpq Connection Strings.

The former allows a socket scheme and a database parameter. The latter requires postgresql and dbname to be use respectively. It should be possible to form the connect string as a valid libpq URI without any query parameters, which the Node.js pg module will also work with, including connecting via a socket. This allows both versions to run using the same application configuration file.

E.g.

Connect via a socket, using the peer method:

uri: "postgresql://%2Fvar%2Frun%2Fpostgresql/trip"