const { Controller } = require('egg'); const fileName = "home"; class HomeController extends Controller { async index() { const { ctx } = this; ctx.body = { code:200, msg:'test' } } async home() { const { ctx } = this; ctx.body = { code:200, msg:'home' } } async main() { const { ctx } = this; ctx.body = { code:200, msg:'main' } } } module.exports = HomeController;