Moved code from koa to express