This commit is contained in:
2025-11-18 00:59:27 +08:00
commit 9f318205ef
5 changed files with 424 additions and 0 deletions

21
src/demo.ts Normal file
View File

@@ -0,0 +1,21 @@
import { App } from '@kevisual/router';
const app = new App();
app.route({
description: 'Demo route',
id: 'abc'
}).define(async (ctx) => {
ctx.body = 'Hello, Kevisual Router!';
}).addTo(app);
app.router.createRouteList()
app.call({
path: 'route',
key: 'list'
}).then((res) => {
console.log('Registered res:', res);
}).catch((error) => {
console.error('Error fetching res:', error);
});