rou3.mts
This file
Path
benchmarks/routers/src/rou3.mts
19 lines 路 480 bytes 路 TypeScript
Last changed by
Not known.
History of this fileTake it
1234567891011121314151617181920import { addRoute, createRouter, findRoute } from 'rou3'import type { RouterInterface } from './tool.mts'import { handler, routes } from './tool.mts'
const name = 'rou3'const router = createRouter()
for (const route of routes) { addRoute(router, route.path, route.method, handler)}
export const rou3Router: RouterInterface = { name, match: (route) => { findRoute(router, route.path, route.method, { ignoreParams: false, // Don't ignore params }) },}