A node.js mysql adapter for managing/querying pooled connections on top of <code>node-mysql</code> module.
npm install mysql-connection-pool
A Node.js api wrapper for a cluster of MySQL instances. Probably a naive approach but could become more fully-featured and tested in the future. Would only recommend as experimental. Uses
Here's an example using it:
var configurations =host:'0.0.0.0' user:'user' password:'secret'host:'0.0.0.1' user:'user' password:'secret'host:'0.0.0.2' user:'user' password:'secret';// Initialize pool of connectionsvar pool = configurations;// Opens all connections in the poolpool;// Query a connection in the pool, logging outputpool;// Close the entire pool after 3 seconds (otherwise thread remains open);
Using an external config:
var _ = ;var config = ;var MysqlConnectionPool = ;var pool = _;