Skip to content

Commit

Permalink
馃悰 fix: fix gateway runtime (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jan 11, 2024
1 parent 84e360c commit 8b1a443
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pages/api/gateway.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { createLobeChatPluginGateway } from '@lobehub/chat-plugins-gateway';
import { createGatewayOnEdgeRuntime } from '@lobehub/chat-plugins-gateway';

export const config = {
runtime: 'edge',
};

export default async (req: Request) => {
if (process.env.NODE_ENV === 'development') {
return createLobeChatPluginGateway()(req);
return createGatewayOnEdgeRuntime()(req);
}

return;
return new Response('gateway');
};

0 comments on commit 8b1a443

Please sign in to comment.