UNPKG

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