ali-mysql-client
Version:
a lightweight mysql tools for nodejs
19 lines (15 loc) • 418 B
JavaScript
/* eslint-disable no-unused-vars */
;
module.exports = app => {
class HomeController {
async index(ctx, next) {
const result = await app.service.foo.getDetail();
ctx.body = 'tables表信息' + JSON.stringify(result);
}
async foo(ctx, next) {
const result = await app.service.foo.getCount();
ctx.body = '表数量:' + result;
}
}
return HomeController;
};