import { Context, Next } from "koa" export class Index { static async index(ctx: Context, next: Next): Promise { ctx.body = "This is Home!" await next() } static async json(ctx: Context, next: Next): Promise { ctx.type = "json" ctx.body = { code: "200", message: "This is Home!", } await next() } static async view(ctx: Context) { await ctx.render("index", { name: "titor", }) } }