bknd
Version:
Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.
16 lines (15 loc) • 948 B
TypeScript
import { serve as honoServe } from "@hono/node-server";
import { type RuntimeBkndConfig } from "bknd/adapter";
import { type App } from "../..";
type NodeEnv = NodeJS.ProcessEnv;
export type NodeBkndConfig<Env = NodeEnv> = RuntimeBkndConfig<Env> & {
port?: number;
hostname?: string;
listener?: Parameters<typeof honoServe>[1];
/** @deprecated */
relativeDistPath?: string;
};
export declare function createApp<Env = NodeEnv>({ distPath, relativeDistPath, ...config }?: NodeBkndConfig<Env>, args?: Env): Promise<App<import("../..").Connection<unknown>, import("../../core/types").PartialRec<import("../..").ModuleConfigs>, import("../../App").AppOptions>>;
export declare function createHandler<Env = NodeEnv>(config?: NodeBkndConfig<Env>, args?: Env): (req: Request) => Promise<Response>;
export declare function serve<Env = NodeEnv>({ port, hostname, listener, ...config }?: NodeBkndConfig<Env>, args?: Env): void;
export {};