add beforeMiddlewares. Remove koa-render and add koa-render-locals