Тёмный

How to connect Next.js to a database (in 5 minutes) 

Web Dev Cody
Подписаться 237 тыс.
Просмотров 13 тыс.
50% 1

Become a YT Members to get extra perks!
/ @webdevcody
My Products
🏗️ WDC StarterKit: wdcstarterkit.com
📖 ProjectPlannerAI: projectplanner...
🤖 IconGeneratorAI: icongeneratora...
Useful Links
💬 Discord: / discord
🔔 Newsletter: newsletter.web...
📁 GitHub: github.com/web...
📺 Twitch: / webdevcody
🤖 Website: webdevcody.com
🐦 Twitter: / webdevcody

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 81   
@naughtiousmaximus7853
@naughtiousmaximus7853 3 месяца назад
Cody, one question. Can you show us how to use Nextjs with authentication from different backend (for example: Nextjs frontend + Go backend and authentication/authorization)? That would be very rock solid content. Maybe even connecting nextjs with different backend in general.
@ashimov1970
@ashimov1970 3 месяца назад
I support the question
@jitxhere
@jitxhere 3 месяца назад
Hey there I want to know one thing. When using separate backend what advantage would nextjs provide?? Like over vits+ react??
@naughtiousmaximus7853
@naughtiousmaximus7853 3 месяца назад
@@jitxhere I am supposed to build website + web app for local business. Next provides a lot of features on top of SSR which is super important for SEO.
@pushpalghoshal1134
@pushpalghoshal1134 3 месяца назад
I would definitely like to see some content on this exact stack. NextJS and go backend
@khaledsanny4817
@khaledsanny4817 3 месяца назад
@@jitxhere First you still have the easy SSR, SSG stuff capabilities and their benefits. The main idea behind a separate backend is that other apps can use it, what can't be achieved using NextJS server actions only
@robertm4934
@robertm4934 3 месяца назад
Love these kinds of videos.. No BS, just straight to the point with great explanations. Appreciate you Cody!
@MasterEd725
@MasterEd725 3 месяца назад
Love it! Keep doing these types of short and to the point videos! Appreciate you Cody!
@WebDevCody
@WebDevCody 3 месяца назад
thanks man!
@Ivcota
@Ivcota 3 месяца назад
You probs do killer demos at work. Being a RU-vidr comes with a massive benefit of increasing your communication skills. Awesome work Cody!
@WebDevCody
@WebDevCody 3 месяца назад
I'm glad you think that
@user-he2xv2dx6z
@user-he2xv2dx6z 20 дней назад
Love the no bs straight to the point videos thanks cody really appreciate it
@kurwacherry
@kurwacherry 3 месяца назад
YESS!!! KEEP DOING THESE QUICK VIDEOS, only 2nd one and i love it
@Szachrajek
@Szachrajek 3 месяца назад
This 5 minutes format is super idea! Keep going, please
@bobbyboxer2664
@bobbyboxer2664 3 месяца назад
Immediate like just by reading the title and seeing the length of the video 💪🏼💪🏼
@loorinho
@loorinho 3 месяца назад
Straight to the point. I love these kinds of videos "mentor". Much love from Uganda.
@bonchan4404
@bonchan4404 3 месяца назад
thanks cody keep this kind of short videos its an easy watch for me !
@rodrigoa958
@rodrigoa958 3 месяца назад
Great short video mate. We need more like these ones
@wingsaber629
@wingsaber629 3 месяца назад
LOVE THESE. Can you do a full section on purely editing complicated forms? Editing is such a pain.
@itami661
@itami661 3 месяца назад
Can you put all these nextjs content in one playlist, it will be helpful. Thanks
@raviel_0422
@raviel_0422 3 месяца назад
Straight to the point explanation. Thank you.
@cameronadams4366
@cameronadams4366 3 месяца назад
you know your shit ! love seeing these quick quick tutorials around Next. Can you do a quick tutorial how to implement session based auth or any quick implementation of any type of auth please ?
@alphagaming003
@alphagaming003 3 месяца назад
just what i needed. Thank you so much
@Code731
@Code731 3 месяца назад
Great video. Please make more like this type of quickies!
@huayralucas2776
@huayralucas2776 3 месяца назад
Hi Cody, thanks for your amazing videos, so inspiring! Would you be so kind as to share with us why you choose drizzle instead of say, Prisma, or other ORM?
@codewithmarcin
@codewithmarcin 3 месяца назад
Love these type of short form videos. Kinda reminds me of fireships videos. Bit of a challenge. Can you do a Stripe explainer in under 10min? haha
@WebDevCody
@WebDevCody 3 месяца назад
Great suggestion!
@VincenzoCassaro
@VincenzoCassaro 3 месяца назад
yep loving them. Would have also liked if it was a "continuation" of the previous one, like building on top
@WebDevCody
@WebDevCody 3 месяца назад
ahh true, good point
@justinleong3967
@justinleong3967 3 месяца назад
Thumbs up for these type of content
@magnuserikkeenrobot1117
@magnuserikkeenrobot1117 3 месяца назад
i like the short videos
@Xiloe
@Xiloe 3 месяца назад
I love this format of video, fast and easy, thanks! also, what's your keyboard? love the sound!
@WebDevCody
@WebDevCody 3 месяца назад
klack.app
@Xiloe
@Xiloe 3 месяца назад
@@WebDevCody best 5.99 I spent, thanks!
@SeibertSwirl
@SeibertSwirl 3 месяца назад
Love you babe! Great job as always
@WebDevCody
@WebDevCody 3 месяца назад
😘 thanks my love
@kotokarrera
@kotokarrera 3 месяца назад
Turso looks fine
@deepjyotideb1173
@deepjyotideb1173 3 месяца назад
Did you ever try to implement a captcha service in next js? How hard is it?
@WebDevCody
@WebDevCody 3 месяца назад
yeah I did it before, it wasn't too hard I don't think
@Tanner-cz4bd
@Tanner-cz4bd 3 месяца назад
What about drizzle + clerk
@MadeInJack
@MadeInJack 3 месяца назад
Is it possible to reproduce a Firebase-like behavior with real-time subscriptions of queries? The best DX for me is to subscribe to documents/rows, let it change in real-time whenever anyone writes to them (the UI will reactively update to the new data), and separately write to documents from some function whenever needed.
@WebDevCody
@WebDevCody 3 месяца назад
use convex
@MadeInJack
@MadeInJack 3 месяца назад
@@WebDevCody I was hoping for an open source, self-hostable solution :/ Looks like PocketBase could work, but I was hoping to know if there's a generalized best-practice way of implementing it independently from the DB choice? Does Drizzle support RT subscriptions? Thanks!
@genie_dev
@genie_dev 3 месяца назад
Why use drizzle over prisma? Just wanting to know as I have only used Prisma before and thinking about using drizzle for future projects.
@WebDevCody
@WebDevCody 3 месяца назад
I personally also like Prisma a lot, but drizzle allows you to write everything and type script, which I find more preferable and secondly, you can drop down to do raw sequel queries, and drizzle if you need to which makes it really nice for those really strange queries or performance tuning
@genie_dev
@genie_dev 3 месяца назад
@@WebDevCody i see, will definitely check out drizzle on my next projects! Thanks Cody
@notrab
@notrab 3 месяца назад
Awesome video! ❤
@nellison
@nellison 3 месяца назад
It will probably cost you money but save u time if you use a db manager such as Turso but is it possible to setup and run a db without using turso to save u money?
@WebDevCody
@WebDevCody 3 месяца назад
Yeah you can use SQLite on local disc
@nikakondra5321
@nikakondra5321 3 месяца назад
How do you cache data in server components for drizzle queries?
@denisblack9897
@denisblack9897 3 месяца назад
Id really like a video on how to have a next.js that is stripped of all the SSR and server side bullshit. You have to have a python backend these days, if you didnt know😅
@WebDevCody
@WebDevCody 3 месяца назад
You’d just do fetch calls using react query and put use client at the top of every file
@alasassi960
@alasassi960 3 месяца назад
can you next-auth with prisma connected to mongodatabse as next video? please.
@WebDevCody
@WebDevCody 3 месяца назад
I don’t use mongo
@JS_Jordan
@JS_Jordan 3 месяца назад
could you do a vid on unstable_cache?
@WebDevCody
@WebDevCody 3 месяца назад
Sure
@m.waseem6616
@m.waseem6616 3 месяца назад
very good
@nishanRocka
@nishanRocka 3 месяца назад
Good one! Code e
@alveek
@alveek 3 месяца назад
Why drizzle over prisma?
@WebDevCody
@WebDevCody 3 месяца назад
I like how it uses typescript for define schema instead of prisma DSL
@radimhof
@radimhof 3 месяца назад
Kysely query builder is even better.
@raiyansarker
@raiyansarker 3 месяца назад
@@radimhof why?
@denispilyutin4843
@denispilyutin4843 3 месяца назад
Are there free products?
@WebDevCody
@WebDevCody 3 месяца назад
turso has a free tier, great for learning or building something small imo
@denispilyutin4843
@denispilyutin4843 3 месяца назад
@@WebDevCody , thanks , will look into it !
@hershalrao3472
@hershalrao3472 2 месяца назад
why turso over supabase ??
@WebDevCody
@WebDevCody 2 месяца назад
Turso is SQLite, supabase is Postgres. Different databases. SQLite works great for a majority of applications.
@velhoguidsd
@velhoguidsd 3 месяца назад
5 minutes cody.
@WebDevCody
@WebDevCody 3 месяца назад
delivering quality as promised
@sani-us-nainrajpoot7382
@sani-us-nainrajpoot7382 3 месяца назад
This nextjs feature is just so BS. Why would I connect my app directly to DB instead of server?
@WebDevCody
@WebDevCody 3 месяца назад
The server action runs on the server.
@cameronadams4366
@cameronadams4366 3 месяца назад
i keep getting this error :/ No config path provided, using default path Reading config file 'C:\code\camthehuman\drizzle.config.ts' Error No schema files found for path config ['./src/db/schema.ts']
@Sahil-me5kg
@Sahil-me5kg 3 месяца назад
Thanks for the video as apparently for databases like vercel postgres and supabase this step in drizzle just after executing npx drizzle-kit push throws Error: connect ETIMEDOUT 52.20.107.131:5432 at __node_internal_captureLargerStackTrace (node:internal/errors:490:5) at __node_internal_exceptionWithHostPort (node:internal/errors:668:12) at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1532:16) at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) { errno: -4039, code: 'ETIMEDOUT', syscall: 'connect', address: '52.20.107.131', port: 5432 } cool sqlite db like turso worked for me
@WebDevCody
@WebDevCody 3 месяца назад
I’m not sure what’s going on there because I have used drizzle with post grass before so I would say double check your database URL and also read through the documentation for post on the drizzle docs
@Sahil-me5kg
@Sahil-me5kg 3 месяца назад
@@WebDevCody yup tried it vercel postgres works now with the same connection url , might be some different issue
Далее
Applying clean architecture to my Next.js project
20:15
Fetching Data Doesn't Get Better Than This
6:58
Просмотров 121 тыс.
这位大哥以后恐怕都不敢再插队了吧…
00:16
НЕ БУДИТЕ КОТЯТ#cat
00:21
Просмотров 848 тыс.
Why I'm Using Express Instead of NextJS
5:23
Просмотров 113 тыс.
The Only Database Abstraction You Need | Prime Reacts
21:42
How I structure my next.js applications
23:19
Просмотров 29 тыс.
This is why feature flags are useful
6:16
Просмотров 9 тыс.
How to setup Lucia auth in Next.js (in 8 minutes)
8:20