How to connect your NextJs app to MongoDB

preview_player
Показать описание
Learn how to connect your NextJs app to MongoDB without exhausting your connection pool and organize your database query functions.

➡️ The Ultimate NextJs Course
Рекомендации по теме
Комментарии
Автор

man ur content is life saving, keep teaching us sensei

eloualielouali
Автор

Thanks for the help! I like the way you teach.

alberteinstein
Автор

first time, i join in nextjs, so i like the your lecture ~ it's very nice~ it's getting ability up to me

poet
Автор

Another awesome next13 video!
Question what if I wanted to do a grid display and wrap each movie edit / delete button? For example,
Robin Hood <edit><Delete>
Go West <edit><Delete>
JAWS <edit><Delete>
It is my understanding you would need to add a "use client" component to add the <edit> and <delete> functionality?

yo
Автор

You saved me thanks, appreciate your hard work.

parijatbest
Автор

Thank you for the video. 6:55 singletoe pattern is used to share the existing instance of connection for better performance but why is that not used in production then?

licokr
Автор

Hi, I just found this video while starting to work with nextjs and mongodb together. I've put everything according to the video including the MONGODB_URI string, and all the code is the same down to the letter, but I keep getting a certificate validation failed error no matter what I do. I'm working with nextjs 13. Do you perhaps know why that would be? Thanks! love your videos btw super easy to follow and clear :D

juunis
Автор

Hey ! Thanks for your videos on nextjs 13 ! I really appreciate it !

There is mistake in the api folder. You're returning a 425 status code. I think it's a 405 status code instead.

Keep going, cheers from France !

LePrz
Автор

Thanks for this great video. What if we want to implement models and use them instead of "months" or populate fields?

Vittokm
Автор

awesome video! please upload the mongodb video soon. Thanks

Renzo-ofyn
Автор

Hi There, why did you not use the api routes in the "App" folder?

margosdesarian
Автор

مرسی بابت ویدیوت و تایمی ک گذاشتی خیلی ممنونت میشدیم کد هم میزاشتی واسمون مچکر

jogqnjq
Автор

Thank you for the video! Do you have the code in Github available?

patite
Автор

Awesome content. I have a request to you if possible. Can you do a tutorial using the new NextJS 13 with i18n like next-translate or something similar?

h.fernandes
Автор

How did you fetch the data not specifying the db name? It didn't work for me until I specified the db name `db = await client.db("sample_mflix");`.

junkim
Автор

in 9:20, why do you need to wrap init() in an async arrow function, but not just call init() directly?

EnnBlack
Автор

Hi, thanks for the video, can you put out a video of the deployment? Much appreciated.

bibooo
Автор

That part you cut just to speed up the process was very important :(

JohnsonREll
Автор

Noob question, but when do you close the database connection?

michaelxaviercanonizado
Автор

Can I connect nextjs to mongo compass locally

wpiwzhq