function connect () {
    // postgres
    if (conf.type == 'postgres') {
        // reads connect information from conf.js file
        var postgres = require('pg');
        module.exports.type = 'postgres';
        dbLink = new postgres.Client('postgres://'+ conf.user + ':' + conf.pass + '@' + conf.host + ':' + conf.port + '/' + conf.db);
        dbLink.connect(function (error) {
            // log connection error 
            if (error) { 
                var msg = 'Postgres: cannot connect to the database (HOST:'+ conf.host + ', USER:' + conf.user + ', DB:' + conf.db + ')' + ' -- ' + error;
                if (logger) logger.error(msg); else console.log(msg);
            }
        });
        return 'postgres';
    }
    // MySQL
    if (conf.type == 'mysql') {
        var msg = 'Mysql is not currently supported.';
        if (logger) logger.error(msg); else console.log(msg);
        return 'mysql';
    }
}
Module that helps to work with Postgres DB
 DEPENDENCIES: pg or mysql