first commit

This commit is contained in:
编码猿
2024-09-27 01:16:59 +08:00
commit 885e756114
10 changed files with 674 additions and 0 deletions

22
db/index.js Normal file
View File

@@ -0,0 +1,22 @@
const mysql = require('yn-mysql-utils')
class DB {
constructor () {
this.data = new mysql({
host : '127.0.0.1',
user : 'root',
password : 'lb714500',
database : 'shop',
connectionLimit : 10
});
}
async Query(params) {
return await this.data.Query({
sql: params.sql,
par: params.data
})
}
}
module.exports = new DB();