abearxiong c692061b23 refactor router system and update version
- Simplified Route class by removing validator functionality
- Added AppRouteContext type for better type safety
- Added forward method to RouteContext for response handling
- Replaced queryRoute with run method for consistency
- Improved Server class with proper cleanup methods
- Updated Mini class to extend QueryRouterServer properly
- Removed lodash-es dependency and nanoid random import
- Added deprecation warnings for older methods
- Enhanced route handling and middleware execution

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 12:30:47 +08:00
2025-10-22 17:05:20 +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-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 549 KiB
Languages
TypeScript 96.1%
JavaScript 3.9%