Skip to content

DonBattery/huli-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Húlí Environment Service

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published