- error src\app\page.js (6:20) @ db
- error TypeError: client.db is not a function
at Home (./src/app/page.js:12:23)
at async Promise.all (index 0)
4 |
5 | const client = connectDB;
> 6 | const db = client.db("forum");
| ^
7 | let a = await db.collection('post').find().toArray();
8 | console.log(a)
9 |
- error src\app\page.js (6:20) @ db
- error TypeError: client.db is not a function
at Home (./src/app/page.js:12:23)
at async Promise.all (index 0)
digest: "447737522"
4 |
5 | const client = connectDB;
> 6 | const db = client.db("forum");
| ^
7 | let a = await db.collection('post').find().toArray();
8 | console.log(a)