The tutorial found at How to Integrate MongoDB Into Your Next.js App | MongoDB has us use the sample code that is brought in with this terminal commnad: npx create-next-app --example with-mongodb mflix.
This sample code has a lib/mongodb.ts file that exports default client;
However the tutorial’s code within the article uses clientPromise to create the connections within the API calls. I believe either the sample code should be corrected or the article should be correct. Thank you.