Skip to content

Commit

Permalink
add mysql-helper plug-in
Browse files Browse the repository at this point in the history
  • Loading branch information
lienren committed Jan 9, 2018
1 parent 9fc0b2c commit b58e50b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: Lienren
* @Date: 2018-01-02 14:28:21
* @Last Modified by: Lienren
* @Last Modified time: 2018-01-08 20:20:25
* @Last Modified time: 2018-01-09 11:02:51
*/
'use strict';
const http = require('http');
Expand All @@ -14,7 +14,7 @@ const bodyParser = require('koa-bodyparser');
const app = new koa();

const mysqlconfig = require('./configs/mysql_config');
const sqlhelper = require('mysql-helper-simple').init(mysqlconfig);
const sqlhelper = require('mysql-helper-simple')(mysqlconfig);
app.context.db = sqlhelper

// 静态存放地址
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"koa-router": "^7.3.0",
"koa-static": "^4.0.2",
"koa2-cors": "^2.0.5",
"mysql-helper-simple": "^1.0.2",
"mysql-helper-simple": "^1.1.1",
"squel": "^5.12.0"
},
"devDependencies": {},
Expand Down
2 changes: 1 addition & 1 deletion router.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: Lienren
* @Date: 2018-01-08 16:21:55
* @Last Modified by: Lienren
* @Last Modified time: 2018-01-08 20:35:35
* @Last Modified time: 2018-01-09 09:57:09
*/
'use strict';
const Router = require('koa-router');
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ [email protected]:
version "2.0.0"
resolved "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"

mysql-helper-simple@^1.0.2:
version "1.0.4"
resolved "http://registry.npm.taobao.org/mysql-helper-simple/download/mysql-helper-simple-1.0.4.tgz#0c9121eb03fe86373b9ea7a0cec39f7050434fbb"
mysql-helper-simple@^1.1.1:
version "1.1.1"
resolved "http://registry.npm.taobao.org/mysql-helper-simple/download/mysql-helper-simple-1.1.1.tgz#5b0f2a4944de196983181110684aaed2829374e9"
dependencies:
mysql "^2.15.0"

Expand Down

0 comments on commit b58e50b

Please sign in to comment.