client-side implementation of koa