This commit is contained in:
abearxiong committed 2025-11-18 00:59:27 +08:00
commit 9f318205ef
5 files changed
+424

No files matched your search

+21
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);
});