24 lines
464 B
TypeScript
24 lines
464 B
TypeScript
import { QueryRouterServer } from "@kevisual/router";
|
|
|
|
const app = new QueryRouterServer();
|
|
|
|
app.route({
|
|
path: 'main'
|
|
}).define(async (ctx) => {
|
|
ctx.body = {
|
|
message: 'this is main. filename: root/light-code-demo/main.ts',
|
|
params: ctx.query
|
|
}
|
|
}).addTo(app)
|
|
|
|
app.route({
|
|
path: 'main2'
|
|
}).define(async (ctx) => {
|
|
ctx.body = {
|
|
message: 'this is main2. filename: root/light-code-demo/main.ts',
|
|
params: ctx.query
|
|
}
|
|
}).addTo(app)
|
|
|
|
|
|
app.wait() |