mongodb connection

This commit is contained in:
isaconantonis 2023-07-12 15:47:01 +02:00
parent 2bc3453ff9
commit ee267bf62a
20 changed files with 210 additions and 548 deletions

11
lib/mongodb.ts Normal file
View file

@ -0,0 +1,11 @@
import { MongoClient, ServerApiVersion } from "mongodb"
const client = new MongoClient(process.env.MONGODB_URI, {
serverApi: {
version: ServerApiVersion.v1,
strict: true,
deprecationErrors: true,
},
})
export default client