mongodb connection
This commit is contained in:
parent
2bc3453ff9
commit
ee267bf62a
20 changed files with 210 additions and 548 deletions
11
lib/mongodb.ts
Normal file
11
lib/mongodb.ts
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue