import Koa from "koa" ; import bodyParser from "koa-bodyparser" ; import cors from "koa2-cors" ; import { routes } from "./routes" ; export const app = new Koa ( ) ; app . use ( cors ( { origin : "*" } ) ) ; app . use ( bodyParser ( ) ) ; app . use ( routes ) ;