Files
router/docs/examples/base.md

226 B

最基本的用法

import { App } from '@kevisual/router';
const app = new App();
app.listen(4002);

app
  .route({ path: 'demo', key: '02' })
  .define(async (ctx) => {
    ctx.body = '02';
  })
  .addTo(app);