mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 08:36:01 +00:00
fixed nextjs build + confirmed node adapter
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Api, App, type CreateAppConfig } from "bknd";
|
||||
import { isDebug } from "bknd/core";
|
||||
import { nodeRequestToRequest } from "../index";
|
||||
|
||||
type GetServerSidePropsContext = {
|
||||
@@ -46,7 +45,7 @@ function getCleanRequest(req: Request) {
|
||||
let app: App;
|
||||
export function serve(config: CreateAppConfig) {
|
||||
return async (req: Request) => {
|
||||
if (!app || isDebug()) {
|
||||
if (!app) {
|
||||
app = App.create(config);
|
||||
await app.build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user