API not showing

I’m following the guide here:

by using the repo found here:

However, I have come across a couple of issues… The example provided shows the following MONGODB_URI

MONGODB_URI=mongodb+srv://:@cluster0.tdm0q.mongodb.net/sample_mflix?retryWrites=true&w=majority

However, when I go to MongoDB Atlas and click Connect I get:

mongodb+srv://admin:<password>@domainname.tmaej.mongodb.net/test

It does not reference “/sample_mflix?retryWrites=true&w=majority” at the end of MONGODB_URI, it just says “test”.

Also, when I go to /api/movies as the guide describes, it is not working for me:
with-mongodb-lilac .vercel.app/api/movies

I have tried this locally with “npm run dev” and also using Deploy with Vercel, both to no avail. The /api folder is in the /pages directory, but according to the guide I should be seeing this when I go to this link:
mongodb .com/developer/images/nextjs/with-mongodb-api.png
Any help is greatly appreciated!
Thanks

Hey @Kim_Stewart . I’ll work on updating the article this week. It is out of date, due to the newly released Next-with-mongodb package, which had some breaking changes.

1 Like