/// import { ErrorRequestHandler, RequestHandler } from 'express'; import { Server as HTTPServer } from 'http'; import { Router } from '../router'; import { RouterRoute } from '../router/router.types'; /** * Wrapper around an express instance */ export declare class Server { private app; private server?; routes: RouterRoute[]; constructor(); /** * Attach middlewares and handlers to the express instance * @param handlers */ use: (...handlers: (RequestHandler | ErrorRequestHandler)[]) => void; /** * Attach routers with schema to the express instance and register the routes * @param routers */ useRouters: (...routers: Router[]) => void; /** * Start the server on given port * @param port * @param callback */ listen: (port: number | string, callback: () => void) => HTTPServer; /** * Close the server connection */ close: (callback: (err: Error | undefined) => void) => HTTPServer | undefined; /** * Get the express server instance */ get expressInstance(): import("express-serve-static-core").Express; } //# sourceMappingURL=server.d.ts.map