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


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


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!

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