Skip to content

Commit

Permalink
upgrade web-server package.json
Browse files Browse the repository at this point in the history
upgrade generic-pool version to last
  • Loading branch information
NextZeus committed Feb 17, 2017
1 parent d7d95c8 commit 09f7d6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web-server/lib/dao/mysql/dao-pool.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var _poolModule = require('generic-pool');
var mysqlConfig = require('../../../../shared/config/mysql');
var mysql = require('mysql');

var env = process.env.NODE_ENV || 'development';
if(mysqlConfig[env]) {
Expand All @@ -10,10 +11,9 @@ if(mysqlConfig[env]) {
* Create mysql connection pool.
*/
var createMysqlPool = function(){
return _poolModule.Pool({
return _poolModule.createPool({
name : 'mysql',
create : function(callback) {
var mysql = require('mysql');
var client = mysql.createConnection({
host: mysqlConfig.host,
user: mysqlConfig.user,
Expand Down
2 changes: 1 addition & 1 deletion web-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
, "everyauth": "0.3.0"
, "connect": ">=0.0.1"
, "ejs": "0.8.3"
, "generic-pool": ">=1.0.9"
, "generic-pool": "*"
, "mysql": "*"
}
}
Expand Down

0 comments on commit 09f7d6c

Please sign in to comment.