This little package is responsible to provide connection-object for MySQL connections.
By default it uses the standard RDS environment variables, but it can be overriden with a custom connection-object
The connection object must contain the following keys:
{
"host": "",
"port": "",
"user": "",
"password": "",
"database": "",
}
the default connection-object is:
{
host: process.env.RDS_HOSTNAME,
port: process.env.RDS_PORT,
user: process.env.RDS_USER,
password: process.env.RDS_PASSWORD,
database: process.env.RDS_DATABASE,
}
The module exports two function:
One is to get the default (or occasionaly injected) connection-object
function getDBConn(connObj)
and the other is to override the default connection-object
function setDBConn(connObj)