UNPKG

file-routing-expressjs

Version:

A dependency-free, flexible, system-based file routing for Express.

14 lines 404 B
import path from "path"; import fs from "fs"; import { RoutesRootNotFound } from "../types"; function resolveTarget(target) { const resolved = path.resolve(process.cwd(), target || "./src/routes"); if (!fs.existsSync(resolved)) { throw new RoutesRootNotFound(`Target folder does not exist: ${resolved}`); } return resolved; } export { resolveTarget }; //# sourceMappingURL=resolvers.mjs.map