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

  Рет қаралды 6,081

Web Dev Cody

Web Dev Cody

7 күн бұрын

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

Пікірлер: 79
@naughtiousmaximus7853
@naughtiousmaximus7853 5 күн бұрын
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 5 күн бұрын
I support the question
@jitx2797
@jitx2797 5 күн бұрын
Hey there I want to know one thing. When using separate backend what advantage would nextjs provide?? Like over vits+ react??
@naughtiousmaximus7853
@naughtiousmaximus7853 5 күн бұрын
@@jitx2797 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 5 күн бұрын
I would definitely like to see some content on this exact stack. NextJS and go backend
@khaledsanny4817
@khaledsanny4817 5 күн бұрын
@@jitx2797 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 5 күн бұрын
Love these kinds of videos.. No BS, just straight to the point with great explanations. Appreciate you Cody!
@giantTurtle3000
@giantTurtle3000 Күн бұрын
This next js series is much appreciated.
@MasterEd725
@MasterEd725 5 күн бұрын
Love it! Keep doing these types of short and to the point videos! Appreciate you Cody!
@WebDevCody
@WebDevCody 5 күн бұрын
thanks man!
@loorinho
@loorinho 3 күн бұрын
Straight to the point. I love these kinds of videos "mentor". Much love from Uganda.
@tommycallsuback
@tommycallsuback 5 күн бұрын
blue shirt and blue vscode theme combination on thumbnail looks awesome and shining
@user-dm8sw5qn4p
@user-dm8sw5qn4p 5 күн бұрын
This 5 minutes format is super idea! Keep going, please
@rodrigoa958
@rodrigoa958 5 күн бұрын
Great short video mate. We need more like these ones
@monoq_
@monoq_ 4 күн бұрын
Straight to the point explanation. Thank you.
@Ivcota
@Ivcota 5 күн бұрын
You probs do killer demos at work. Being a KZfaqr comes with a massive benefit of increasing your communication skills. Awesome work Cody!
@WebDevCody
@WebDevCody 5 күн бұрын
I'm glad you think that
@kurwacherry
@kurwacherry 5 күн бұрын
YESS!!! KEEP DOING THESE QUICK VIDEOS, only 2nd one and i love it
@bonchan4404
@bonchan4404 5 күн бұрын
thanks cody keep this kind of short videos its an easy watch for me !
@bobbyboxer2664
@bobbyboxer2664 5 күн бұрын
Immediate like just by reading the title and seeing the length of the video 💪🏼💪🏼
@alphagaming003
@alphagaming003 Күн бұрын
just what i needed. Thank you so much
@VincenzoCassaro
@VincenzoCassaro 5 күн бұрын
yep loving them. Would have also liked if it was a "continuation" of the previous one, like building on top
@WebDevCody
@WebDevCody 5 күн бұрын
ahh true, good point
@Code731
@Code731 5 күн бұрын
Great video. Please make more like this type of quickies!
@wingsaber629
@wingsaber629 5 күн бұрын
LOVE THESE. Can you do a full section on purely editing complicated forms? Editing is such a pain.
@itami661
@itami661 5 күн бұрын
Can you put all these nextjs content in one playlist, it will be helpful. Thanks
@cameronadams4366
@cameronadams4366 4 күн бұрын
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 ?
@notrab
@notrab 5 күн бұрын
Awesome video! ❤
@justinleong3967
@justinleong3967 4 күн бұрын
Thumbs up for these type of content
@codewithmarcin
@codewithmarcin 5 күн бұрын
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 5 күн бұрын
Great suggestion!
@SeibertSwirl
@SeibertSwirl 5 күн бұрын
Love you babe! Great job as always
@WebDevCody
@WebDevCody 5 күн бұрын
😘 thanks my love
@huayralucas2776
@huayralucas2776 4 күн бұрын
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?
@Xiloe
@Xiloe 5 күн бұрын
I love this format of video, fast and easy, thanks! also, what's your keyboard? love the sound!
@WebDevCody
@WebDevCody 5 күн бұрын
klack.app
@Xiloe
@Xiloe 5 күн бұрын
@@WebDevCody best 5.99 I spent, thanks!
@kotokarrera
@kotokarrera 4 күн бұрын
Turso looks fine
@magnuserikkeenrobot1117
@magnuserikkeenrobot1117 3 күн бұрын
i like the short videos
@nikakondra5321
@nikakondra5321 5 күн бұрын
How do you cache data in server components for drizzle queries?
@m.waseem6616
@m.waseem6616 5 күн бұрын
very good
@deepjyotideb1173
@deepjyotideb1173 5 күн бұрын
Did you ever try to implement a captcha service in next js? How hard is it?
@WebDevCody
@WebDevCody 5 күн бұрын
yeah I did it before, it wasn't too hard I don't think
@nellison
@nellison 5 күн бұрын
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 5 күн бұрын
Yeah you can use SQLite on local disc
@MadeInJack
@MadeInJack 5 күн бұрын
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 5 күн бұрын
use convex
@MadeInJack
@MadeInJack 5 күн бұрын
@@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!
@Tanner-cz4bd
@Tanner-cz4bd 5 күн бұрын
What about drizzle + clerk
@genie_dev
@genie_dev 5 күн бұрын
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 5 күн бұрын
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 5 күн бұрын
@@WebDevCody i see, will definitely check out drizzle on my next projects! Thanks Cody
@JS_Jordan
@JS_Jordan 5 күн бұрын
could you do a vid on unstable_cache?
@WebDevCody
@WebDevCody 5 күн бұрын
Sure
@denisblack9897
@denisblack9897 4 күн бұрын
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 4 күн бұрын
You’d just do fetch calls using react query and put use client at the top of every file
@nishanRocka
@nishanRocka 5 күн бұрын
Good one! Code e
@velhoguidsd
@velhoguidsd 5 күн бұрын
5 minutes cody.
@WebDevCody
@WebDevCody 5 күн бұрын
delivering quality as promised
@alasassi960
@alasassi960 4 күн бұрын
can you next-auth with prisma connected to mongodatabse as next video? please.
@WebDevCody
@WebDevCody 4 күн бұрын
I don’t use mongo
@denispilyutin4843
@denispilyutin4843 5 күн бұрын
Are there free products?
@WebDevCody
@WebDevCody 5 күн бұрын
turso has a free tier, great for learning or building something small imo
@denispilyutin4843
@denispilyutin4843 4 күн бұрын
@@WebDevCody , thanks , will look into it !
@alveek
@alveek 5 күн бұрын
Why drizzle over prisma?
@WebDevCody
@WebDevCody 5 күн бұрын
I like how it uses typescript for define schema instead of prisma DSL
@radimhof
@radimhof 5 күн бұрын
Kysely query builder is even better.
@raiyansarker
@raiyansarker 5 күн бұрын
@@radimhof why?
@sani-us-nainrajpoot7382
@sani-us-nainrajpoot7382 4 күн бұрын
This nextjs feature is just so BS. Why would I connect my app directly to DB instead of server?
@WebDevCody
@WebDevCody 4 күн бұрын
The server action runs on the server.
@aaronsanders6162
@aaronsanders6162 5 күн бұрын
How to connect your mom to database (in 5 minutes)
@Sahil-me5kg
@Sahil-me5kg 5 күн бұрын
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 5 күн бұрын
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
@cameronadams4366
@cameronadams4366 Күн бұрын
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']
the most important Next.js features to learn (in 8 minutes)
8:26
Web Dev Cody
Рет қаралды 21 М.
How I structure my next.js applications
23:19
Web Dev Cody
Рет қаралды 18 М.
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 25 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 7 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 9 МЛН
I Built 100 Houses And Gave Them Away!
9:36
MrBeast
Рет қаралды 56 МЛН
How to Organize Your Solo Dev Project Like a Pro
7:42
CreaDev Labs
Рет қаралды 17 М.
Serverless might bankrupt you (and how to deploy to a VPS instead)
14:26
Learn Drizzle ORM in 13 mins (crash course)
14:00
Neon
Рет қаралды 21 М.
Giving Up On Next.js | Theo Reacts
44:49
Theo - t3․gg
Рет қаралды 112 М.
Why I still choose next.js
19:39
Web Dev Cody
Рет қаралды 18 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 187 М.
Drizzle ORM in 100 Seconds
2:54
Fireship
Рет қаралды 442 М.
What is the "best way" to develop software applications?
18:37
Web Dev Cody
Рет қаралды 267 М.
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 25 МЛН