1 | import * as express from 'express';
|
2 | import * as cors from 'cors';
|
3 | import * as bodyParser from 'body-parser';
|
4 | export declare const Router: typeof express.Router;
|
5 | export { staticRoutes } from './middleware/staticRoutes';
|
6 | export declare type Request = express.Request;
|
7 | export declare type Response = express.Response;
|
8 | export declare function sendError(code: number, res: express.Response, err: Error): void;
|
9 | export declare function app(options?: {
|
10 | cors?: cors.CorsOptions;
|
11 | json?: bodyParser.OptionsJson;
|
12 | static?: string;
|
13 | }): import("express-serve-static-core").Express;
|
14 | export declare function router(): express.Router;
|
15 | export declare function routes(router: express.Router): RouteInfo[];
|
16 | export declare type RouteInfo = {
|
17 | path: string;
|
18 | methods: Array<'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'>;
|
19 | };
|
20 | export declare function logStarted(port: number, args?: {}): void;
|