12 lines
279 B
TypeScript
12 lines
279 B
TypeScript
import { listenSocket, QueryRouterServer } from '@kevisual/router/auto.ts'
|
|
|
|
|
|
const app = new QueryRouterServer();
|
|
|
|
app.route({
|
|
path: 'demo'
|
|
}).define(async (ctx) => {
|
|
ctx.body = 'Hello, this is the demo route!';
|
|
}).addTo(app);
|
|
|
|
listenSocket({ app, timeout: 10 * 60 * 1000 }); |