Hey Arpan! I'm a frontend Developer trying to be the full stack developer. This 20 min video exactly includes what I want. It helped me to reduce so much time for me and I"m really thankful. Wish you the best luck ! Sending a huge support from Korea !~
Great explanation! Straight to the point with no bs. Maybe next vid can be explanation of how to deploy this same app to vercel, google cloud and/or another cloud platform
My man! Appreciate it bro - there were virtually no tutorials for express + next on RU-vid lol. The older videos from like 5 years ago showed that we needed to update some odd settings to enable expressjs and NextJS compatibility (instead of using NEXTJS’ built-in backend), but I guess next has built in support for express now. Appreciate it, Arpan!
Really a great help as I'm a new user of this I faced so many error but with this I got over every of them. Thank you for your help, help us in the future !!
Okay, I really appreciate that for amazing video. But I really would like to know why we use Next.js? If we have only created client side component, we can just use pure React. If we need to create server side component, we can use next.js. Have I a wrong logic? Haven't I. I would like to learn
nicely explained thank you. but there is still some things I would like if you explain like how to handle API calls and manage state in complex applications ? should we use redux or any other thing for state management and state sharing. and also how to deploy both frontend and backend
Hi when you create a new react project the nextjs is inside the project correct? Then how can I implement rest api like connecting to mysql for react to do CRUD operations?
so. we just create a next.js react project normally inside front end folder. and then create a server folder for backend and then install express. and they communicate with each other through API call. thank you so much.
Mostly the same way as with an app that is pure Next. Auth is handled by the next app, if not authorized, you do not/ cannot make calls to the backend. You would also want to pass any relevant session info to the backend I think.
I need this to use express as my file storage system since I do not want to use Azure or AWS. This approach has an issue due to CORS that basically lets your server serve anyone that performs a request from it, so suppose you make an imdb clone and you set up all your API endpoints in express, all I'd have to do is use your app once and with the help of the browser inspection tool I can get these end points and build my own frontend over them so I'd be basically ripping you off. If anyone has a counter approach please reply, this issue is bugging me!
How could one create an authentication system with a nextjs as client andd express as server project ? Like is there something to help us do that ? so that when requests are made to the server, the server knows to identify the user whos made that request ?
i guess you could use jwt? Make the backend send a jwt token in login, and send the jwt to the backend from the client with every request that needs validation? Such as show a profile, etc. If the jwt token is not valid, you could send an error and manage that error from next
i think "boom" is a library that helps you manage errors in the backend, you could use that to help yourself manage errors if it's too much. And later try understanding and create your own errors. I hope that this is some help to you. Sorry if i'm saying something obvious for you and that you may have tried already
@al-ft1ng did you find out how to do it??? Also how would you make your client side pages protected like if there is no user then show login/signup page if there is redirect them to home page. How to do this somebody help
Hello, apologies for the late response. You can use authentication providers like Auth0 and use token authentication on the NextJS frontend. You can then send that same token to the backend (in Express) to authenticate requests.
please can someone help me? :( i have the next js project i want to start the backend using node js and for database mysql when i created my next js app i did not created server folder, now can i just create server folder and use it with my next js app or i need to do all the things again as step by step in the video?
I want to learn nextjs . I just completed html and javascript, so should I learn react or nodejs or nexjs . Please help Will nextjs work without nodesjs
😢 my question after watiching the video is still what is the server for when next js runs one for you on port 3000 are they different i know they different i just can't make sense why 💀we making it to the interview with this one
Hey Arpan, I'm using Windows, and I was following along just fine until 14:04 . For me, there is a squiggly red line under useEffect , and at 15:33 , there is a red line under useState. But the code still works. When I hover my mouse over useEffect, it says "React Hook "useEffect" is called in function "index" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use"." And when I hover my mouse over useState, it shows a similar message "React Hook "useState" is called in function "index" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use"." How should I proceed?
It depends on what you called your functional component in React. Components should not start with "use" as that is a keyword used in React specifically for hooks (such as useEffect and useState). Components should also begin with a capital letter. Following those two conventions should solve your problem.
It is possible, and that is what NextJS is good for. However, there are developers who prefer the frontend capabilities of NextJS but prefer the backend of another framework. This video is useful for those folks!
@@ArpanNeupaneProductions what's the preferred way of doing it? I'm going to switch to next js, RN I know react, node express mongo. I use MVC pattern for backend. Which one used mostly in companies
Suggestion: Thanks for taking the time to share your knowledge. Please don’t record the keyboard typing audio in video. Can barely make it past 2 mins the sound is so annoying. I think it would improve the video; nobody wants to hear you typing.