first commit
This commit is contained in:
1
NodeServer/mysql/.pydio
Normal file
1
NodeServer/mysql/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
254af4fe-8f9b-4edd-b6cf-893f0cc8185a
|
||||
21
NodeServer/mysql/index.js
Normal file
21
NodeServer/mysql/index.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const mysql = require("yn-mysql-utils");
|
||||
|
||||
class MSql {
|
||||
|
||||
constructor() {
|
||||
this.db = new mysql({
|
||||
host : '127.0.0.1',
|
||||
user : 'root',
|
||||
password : 'lb714500',
|
||||
database : 'ScanCodeLogin',
|
||||
connectionLimit : 10
|
||||
});
|
||||
}
|
||||
|
||||
async query (params) {
|
||||
return await this.db.Query({ sql: params.sql, par: params.data })
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = new MSql();
|
||||
Reference in New Issue
Block a user