2025-10-14 19:17:00 +08:00
2025-10-14 15:16:41 +08:00
2025-10-14 19:15:18 +08:00
2025-05-14 21:04:25 +08:00
2025-05-14 21:04:25 +08:00
2025-10-14 19:15:18 +08:00
2025-04-18 01:16:06 +08:00
2025-10-14 19:17:00 +08:00
2025-07-26 20:38:49 +08:00
2025-05-14 21:04:25 +08:00

router

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);

app
  .route('demo', '03')
  .define(async (ctx) => {
    ctx.body = '03';
  })
  .addTo(app);

兼容服务器

import { App } from '@kevisual/router';

const app = new App();
app.listen(4002);
import { proxyRoute, initProxy } from '@kevisual/local-proxy/proxy.ts';
initProxy({
  pagesDir: './demo',
  watch: true,
});

app.onServerRequest(proxyRoute);
Description
No description provided
Readme 388 KiB
Languages
TypeScript 95.9%
JavaScript 4.1%