import Koa from 'koa/lib/application';
import KoaRouter from '@koa/router';
const app = new Koa({});
const router = new KoaRouter();
app.use(router.routes())
router.get("/", (ctx, next) => {
ctx.type = "text/javascript"
ctx.body = "console.log('hello')"
})
app.listen(2000)
import Koa from 'koa/lib/application';
import KoaRouter from '@koa/router';
const app = new Koa({});
const router = new KoaRouter();
app.use(router.routes())
router.get("/", (ctx, next) => {
ctx.type = "text/javascript"
ctx.body = "console.log('hello')"
})
app.listen(2000)