autostrada
Version:
Auto routes the content of a www directory. You can add a filter to have custom URLs.
16 lines (11 loc) • 415 B
TypeScript
import { RequestHandler } from 'express';
declare interface Options {
fromPathToUrl?: (path: string) => string | string[],
indexableFilesFilter?: (path: string) => boolean,
wwwDirectory?: string,
}
declare interface AutostradaMiddleware extends RequestHandler {
lastChance: (delay: number) => RequestHandler,
}
declare function autostrada(option?: Options): AutostradaMiddleware;
export default autostrada;