next/server/middleware/00.dbconn.ts

9 lines
195 B
TypeScript

import mongoose from "mongoose";
import plugnplay from "~/lib/server/plugnplay";
export default eventHandler(async (event) => {
console.log("mid->connecting........");
await plugnplay();
});