[React]koa-router備忘録

const Router = require('koa-router');
const router = new Router();
router.get('/', async (ctx, next) => {
    if(エラー条件){
        ctx.status = 400;//500
        return;
    }
    await ctx.render('index', {});
});