home.js 378 B

123456789101112
  1. 'use strict';
  2. const Controller = require('egg').Controller;
  3. const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
  4. const { BusinessError, ErrorCode } = require('naf-core').Error;
  5. class HomeController extends Controller {
  6. async index() {
  7. const { ctx } = this;
  8. ctx.body = 'hi, egg';
  9. }
  10. }
  11. module.exports = CrudController(HomeController, {});