All checks were successful
Code quality checks / biome (push) Successful in 10s
- Replace custom logger with @atums/echo library - Restructure imports using # path aliases - Add request performance tracking and better request logging - Improve type definitions and error handling - Add custom file serving capability - Update biome configuration with stricter linting rules - Add comprehensive API documentation (DOCS.md)
22 lines
439 B
TypeScript
22 lines
439 B
TypeScript
import type { Server } from "bun";
|
|
|
|
type RouteDef = {
|
|
method: string;
|
|
accepts: string | null;
|
|
returns: string;
|
|
needsBody?: "multipart" | "json";
|
|
};
|
|
|
|
type Query = Record<string, string>;
|
|
type Params = Record<string, string>;
|
|
|
|
type RouteModule = {
|
|
handler: (
|
|
request: Request,
|
|
server: Server,
|
|
requestBody: unknown,
|
|
) => Promise<Response> | Response;
|
|
routeDef: RouteDef;
|
|
};
|
|
|
|
export type { RouteDef, Query, Params, RouteModule };
|