connection-store
v1.0.0
Published
A store for database connection
Downloads
2
Readme
connection-store
A simple library for the database connections management.
var ConnectionStore = require('connection-store');
// For the default connection
ConnectionStore.addConnection(someConnection);
// For a named connection
ConnectionStore.addConnection('anotherConnection', anotherConnection);
// Retrieve the default connection
var conn = ConnectionStore.getConnection();
// Retrieve a named connection
var conn = ConnectionStore.getConnection('someName');
// Retrieve the connection list
ConnectionStore.getConnectionList();
ConnectionStore.hasConnection('someName')