Next.js with a separate server - good idea?

preview_player
Показать описание
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship).

👉 Discord: all my courses have a private Discord where I actively participate

⏱️ Timestamps:
01:26 Downside of serverless functions
04:19 Benefits of separate server
05:52 Authentication architecture
07:30 Folder structure
12:21 Express API authentication
19:41 Audience claim

#webdevelopment #programming #coding #reactjs #nextjs
Рекомендации по теме
Комментарии
Автор

I would like to see big next.js course/project with a separate backend. Thank you for providing us so valuable content.

kocourekkocourek-pqtm
Автор

It would be super interesting to see the same implementation with an open source framework like next-auth. However, great video!

alexenax
Автор

Wesley, this is the type of unique content I'm expecting from your channel. It's awesome! I hope you will also cover custom authentication without any third-party libraries for Next.js with a separate server.

imkirn
Автор

Yes this type of video is what i was looking for months on youtube and i can't find any proper video talking this much detail. Thanks for bringing in. Also you need custom server if you use Graphql api. If you use inside nextjs you must use external services. Thanks in advance❤❤❤🎉

CodeZakk
Автор

Great video! This is something that is usually glossed over in Next tutorials and frequently a "find out the hard way" kind of thing

JesseConner
Автор

I only host a Next.js app on Vercel (or Netlify) if it's a small or personal project. For serious projects, I always host it on a VPS instance with Node.js, PM2, Nginx for reverse proxy, and Certbot for SSL certificates.

maacpiash
Автор

Useful! Keep this videos coming. People still think that using Next.js makes you locked into Vercel hosting.

dopetag
Автор

Just was thinking about this idea. Thanks a lot for the video

jfuiqyy
Автор

Great video! The thing I would also mention is that if you are accessing IP restricted resources its not possible to do that from vercel without paying for their enterprise amd using their secure compute feature. This is one of rhe main reasons we use a seperate backend. The combo of turborepo trpc still mean we get great DX for this

tom.watkins
Автор

do more these kind of videos! thanks for such great content❤

technologymad
Автор

Yes for large companies you will 100% have APIs that need to handle production traffic be developed and deployed separately. Those carefully control the amount of connections and types of access patterns to business critical databases. It will have rate limiting, waf, observability, disaster recovery, etc. If you see an api for production load be hosted as part of a nextjs deployment, just run.

Tszyu
Автор

Feel happy for new knowledge. when get notification❤

rajfekar
Автор

Thanx for the video! But is next+drizzle (for example) is not solution for question in next with db?)

kostia-stoliarskyi
Автор

I have a question. So if you have a project that is structured as you showed in minute 8 (api, nextjs and shared ) and I'm using prisma for instance, should I genereate my Prisma types in that shared folder and import the generated types to both the api and nextjs? And also, that would mean that I should firstly nmp init that folder, but I'm wondering how should I host it because it's separate.

jovanjevtic
Автор

I love your work man. I have been having these same questions and wanted to know if having a separate server is practical for the next all. great video.

_PieceOfCode
Автор

Can we make server components with a separate node.js server? Will the “use server” work if the Next/Node app was deployed on AWS for example instead of vercel?

markmaksi
Автор

I NEEDED this video! I love next but I’ve been trying to figure out websockets for a multiplayer chess app for a while and there is not a lot of good quality documentation about exactly how to integrate external servers well.

mikelautensack
Автор

This is what I need. But how do you access/import files i.e the db connection that is in the common folder? For instance if you have prisma in the common folder how do you import it in the next.js directory and in the express directory?

Code-szdb
Автор

In my case the API is written in Symphoni(PHP). How do i make some routes protected. Also, how do i handle session after the user is successful signed in

ayukalvieri
Автор

Please make a video on how can we handle jwt access token & refresh token based authentication with a separate backend on next js 14 without using any 3rd party service. ❤

debarshidas