(require("dbConnection"))(connectionStringOrObject, noLocking) → {Database}

This module will create a connection to the database and return it. It is an instance of Database (as used in pg-promise). Once this is require'd once, the same object will be returned througout the app.
Parameters:
Name Type Description
connectionStringOrObject string | object Database Object instance, Connection object or string
noLocking bool If passing in a connection object or string, whether to use locking or not.
Author:
  • Frank Villasenor
Source:
Returns:
the Database instance to use.
Type
Database