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.
17 lines (14 loc) • 806 B
TypeScript
import { Express, Handler } from 'express';
type ViteServerHook = (server: Express, viteServer: any) => void;
type ServerHook = (server: Express) => void;
type HandlerHook = (handler: Handler) => void;
type StatusHook = (server: Express, status: any) => void;
declare const viteServerBefore: ViteServerHook;
declare const viteServerAfter: ViteServerHook;
declare const serverBefore: ServerHook;
declare const serverAfter: ServerHook;
declare const handlerBefore: HandlerHook;
declare const handlerAfter: HandlerHook;
declare const serverListening: StatusHook;
declare const serverError: StatusHook;
export { type HandlerHook, type ServerHook, type StatusHook, type ViteServerHook, handlerAfter, handlerBefore, serverAfter, serverBefore, serverError, serverListening, viteServerAfter, viteServerBefore };