feat: update adapter to use globalThis for origin resolution fix: remove unused ClientQuery export from query.ts chore: update tsconfig to include test files and set rootDir feat: add create-query functionality for dynamic API generation feat: implement QueryApi with enhanced type inference from JSON Schema test: add comprehensive API tests for QueryApi functionality test: create demo routes and schemas for testing purposes docs: add type inference demo for QueryApi usage
18 lines
283 B
TypeScript
18 lines
283 B
TypeScript
import { App } from '@kevisual/router';
|
|
|
|
const app = new App({});
|
|
|
|
app
|
|
.route({
|
|
path: 'test',
|
|
key: 'test',
|
|
})
|
|
.define(async (ctx) => {
|
|
ctx.body = 'test';
|
|
})
|
|
.addTo(app);
|
|
|
|
app.listen(4000, () => {
|
|
console.log('Server is running at http://localhost:4000');
|
|
});
|