init: nuxt adapter

This commit is contained in:
2026-03-09 19:05:31 +05:30
parent feb3911d46
commit 7751ee5db8
35 changed files with 988 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
import { serve } from "bknd/adapter/nuxt";
import config from "../../bknd.config";
export default defineEventHandler(async (event) => {
const pathname = event.path
const request = toWebRequest(event);
if (pathname.startsWith("/api") || pathname !== "/") {
const res = await serve(config, process.env)(request);
if (res && res.status !== 404) {
return res;
}
}
});