mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
15 lines
397 B
TypeScript
15 lines
397 B
TypeScript
import { type FrameworkBkndConfig, createFrameworkApp } from "adapter";
|
|
import type { App } from "bknd";
|
|
|
|
export type RemixBkndConfig = FrameworkBkndConfig;
|
|
|
|
let app: App;
|
|
export function serve(config: RemixBkndConfig = {}) {
|
|
return async (args: { request: Request }) => {
|
|
if (!app) {
|
|
app = await createFrameworkApp(config);
|
|
}
|
|
return app.fetch(args.request);
|
|
};
|
|
}
|