servatron
Version:
Create a handler that can server static files using the NodeJS http/http2 modules, or use the inbuilt cli server to quickly run a web server.
16 lines (15 loc) • 524 B
TypeScript
import { PathType } from './getPathInfo.js';
interface FoundDirectory {
directory: string;
filePath: string;
filePathType: PathType;
}
/**
* Recursively look through a list of directories to find
* a path that exists.
*
* @param {Array<string>} directories An array of directory paths
* @param {string} pathname The relative to find
**/
export declare function searchDirectoriesForPath(directories: Array<string>, pathname: string): Promise<FoundDirectory | null>;
export default searchDirectoriesForPath;