UNPKG

@ayonli/jsext

Version:

A JavaScript extension package for building strong and modern applications.

17 lines (16 loc) 786 B
import { withWeb } from "../http/internal.ts"; import { NetAddress, RequestContext, RequestHandler, RequestErrorHandler, ServeOptions, ServeStaticOptions, HttpServer } from "../http/server.ts"; export { withWeb }; export * from "../http/util.ts"; export type { /** * @deprecated Use `NetAddress` from `@ayonli/jsext/net` instead. */ NetAddress, RequestContext, RequestHandler, RequestErrorHandler, ServeOptions, ServeStaticOptions, HttpServer, }; /** * @deprecated Use {@link HttpServer} instead. */ export type Server = HttpServer; export declare function randomPort(prefer?: number | undefined): Promise<number>; export declare function serve(options: ServeOptions): HttpServer; export declare function serveStatic(req: Request, options?: ServeStaticOptions): Promise<Response>;