Koa middlewares

change all middelwares to koa type
thunkify all APIs in proxy