Browse files

Fixed an incorrect usage of the new node-mysql API

  • Loading branch information...
1 parent 1cb75f5 commit cc6bce266d91cb4e118212705fd4d6ad7a89f187 @jhurliman committed Aug 11, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/database.js
View
4 lib/database.js
@@ -1,6 +1,6 @@
var poolModule = require('generic-pool');
-var mysqlClient = require('mysql').createClient();
+var mysql = require('mysql');
var pool = null;
@@ -11,7 +11,7 @@ exports.init = function(dbUser, dbPass, dbDatabase, dbHost, dbPort) {
pool = poolModule.Pool({
name : 'mysql',
create : function(callback) {
- var c = new mysqlClient();
+ var c = mysql.createClient();
if (dbUser) c.user = dbUser;
if (dbPass) c.password = dbPass;
if (dbDatabase) c.database = dbDatabase;

0 comments on commit cc6bce2

Please sign in to comment.