mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
public commit
This commit is contained in:
1
app/src/adapter/remix/index.ts
Normal file
1
app/src/adapter/remix/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./remix.adapter";
|
||||
12
app/src/adapter/remix/remix.adapter.ts
Normal file
12
app/src/adapter/remix/remix.adapter.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { App, type CreateAppConfig } from "../../App";
|
||||
|
||||
let app: App;
|
||||
export function serve(config: CreateAppConfig) {
|
||||
return async (args: { request: Request }) => {
|
||||
if (!app) {
|
||||
app = App.create(config);
|
||||
await app.build();
|
||||
}
|
||||
return app.fetch(args.request);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user