vite-plugin-api-routes
Version:
A Vite.js plugin that creates API routes by mapping the directory structure, similar to Next.js API Routes. This plugin enhances the functionality for backend development using Vite.
11 lines (8 loc) • 413 B
TypeScript
import { RouteModule, RouteInfo } from 'vite-plugin-api-routes/handler';
type ApplyRouter = (route: RouteModule) => void;
type ApplyRouters = (apply: ApplyRouter) => void;
declare const routeBase: string;
declare const routers: RouteInfo[];
declare const endpoints: string[];
declare const applyRouters: ApplyRouters;
export { type ApplyRouter, type ApplyRouters, applyRouters, endpoints, routeBase, routers };