1.0.0 • Published 9 years ago

connection-store v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 years ago

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')