next/server/middleware/00.dbconn.ts

9 lines
250 B
TypeScript
Raw Normal View History

import mongoose from "mongoose";
import { log } from "@server/logger";
import plugnplay from "@server/plugnplay";
export default eventHandler(async (event) => {
log.info("middleware connecting", { label: "middleware/db" });
await plugnplay();
});