import { Env, Hono } from 'hono'; import { ServeStaticOptions } from 'hono/serve-static'; import { BlankEnv } from 'hono/types'; import { H as HonoServerOptionsBase, W as WithoutWebsocket } from '../helpers-BXdVojwF.js'; export { c as createGetLoadContext } from '../helpers-BXdVojwF.js'; import 'hono/ws'; import 'react-router'; type CustomDenoServer = Deno.ServeTcpOptions; interface HonoDenoServerOptions extends HonoServerOptionsBase { /** * Customize the deno server * * {@link https://docs.deno.com/api/deno/~/Deno.serve#parameters} */ customDenoServer?: Partial; /** * Callback executed after server has closed and all inflight requests completed, * before process exit. Only applicable in production mode. * * @example * ```ts * export default createHonoServer({ * onGracefulShutdown: async () => { * await db.close(); * }, * }); * ``` */ onGracefulShutdown?: () => Promise | void; serveStaticOptions?: { /** * Customize the public assets (what's in your `public` directory) serve static options. * */ publicAssets?: Omit, "root">; /** * Customize the client assets (what's in your `build/client/assets` directory - React Router) serve static options. * */ clientAssets?: Omit, "root">; }; } type HonoServerOptionsWithoutWebSocket = HonoDenoServerOptions & WithoutWebsocket; type HonoServerOptions = HonoDenoServerOptions & Omit, "useWebSocket">; /** * Create a Hono server * * @param config {@link HonoServerOptions} - The configuration options for the server */ declare function createHonoServer(options?: HonoServerOptionsWithoutWebSocket): Promise>; export { type HonoServerOptions, createHonoServer };