generated from tailored/router-db-template
temp
This commit is contained in:
15
src/test/router.ts
Normal file
15
src/test/router.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { App, QueryRouterServer } from '@kevisual/router';
|
||||
|
||||
export const app = new App();
|
||||
app
|
||||
.route({
|
||||
path: 'k',
|
||||
key: 'k',
|
||||
})
|
||||
.define(async (ctx) => {
|
||||
ctx.body = 'hello world';
|
||||
})
|
||||
.addTo(app);
|
||||
|
||||
const res = await app.router.queryRoute({ path: 'k', key: 'k' });
|
||||
console.log('res', res);
|
||||
Reference in New Issue
Block a user