@crumbjs/core
Version: 
<img src="https://raw.githubusercontent.com/tuplescompany/crumbjs/refs/heads/main/logo/crumbjs.png" alt="CrumbJS Logo" width="200"/> - The tasty way to build fast apis.
24 lines (23 loc) • 780 B
TypeScript
import { App } from './app';
import type { APIConfig } from './types';
/**
 * Builds an Bun Http server from your main App
 */
export declare class Router {
    private readonly app;
    private readonly startAt;
    constructor(app: App);
    /**
     * Merge global specific defined middlewares and the root App instance middlewares
     * Both applies to all api routes
     */
    private getGlobalMiddlewares;
    private buildRoute;
    /** Ensure title/description/version are present (#config-backed defaults). */
    private getOpenapiSpecs;
    /**
     * Takes all application routes and create Bun.serve compatible Handlers with all request life-cycle throught Processor
     */
    private buildRoutes;
    serve(options?: Partial<APIConfig>): Promise<Bun.Server>;
}