后端链接数据库
This commit is contained in:
6
server/app.js
Normal file
6
server/app.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = app => {
|
||||
app.beforeStart(async () => {
|
||||
const mysqlConfig = await app.configCenter.fetch("mysql")
|
||||
app.database = app.mysql.createInstance(mysqlConfig)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user