Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix readme example.[ci skip]
fixes #136
  • Loading branch information
sandfox committed Mar 26, 2016
1 parent 9f0b42f commit 9a1f0e3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -21,18 +21,18 @@ The history has been moved to the [CHANGELOG](CHANGELOG.md)
// Create a MySQL connection pool with
// a max of 10 connections, a min of 2, and a 30 second max idle time
var Pool = require('generic-pool').Pool;
var mysql = require('mysql'); // v2.10.x

var pool = new Pool({
name : 'mysql',
create : function(callback) {
var Client = require('mysql').Client;
var c = new Client();
c.user = 'scott';
c.password = 'tiger';
c.database = 'mydb';
c.connect();
var c = mysql.createConnection({
user: 'scott',
password: 'tiger',
database:'mydb'
})

// parameter order: err, resource
// new in 1.0.6
callback(null, c);
},
destroy : function(client) { client.end(); },
Expand Down

0 comments on commit 9a1f0e3

Please sign in to comment.