Connecting Backend and Frontend in MERN Stack + Fixing CORS Error - MERN Stack Project Tutorial #8
Вставка
- Опубліковано 14 жов 2024
- #MernStack #mern #MernTutorial #MernStackProject
MERN Stack Tutorial Series with Redux where we will learn to build an Awesome Full Stack Notes Taking Web App Project.
In this video we will Connect our backend and frontend and serve the notes through the API and fix the cors error with proxy.
Source Code -
github.com/piy...
Live Site - notezipper.her...
Full Playlist -
• MERN Stack Project Tut...
Movie App in React JS and Material UI -
• Movies and TV Series S...
Quiz App in React JS and Material UI -
• Quiz App in React JS w...
Dictionary App in React JS and Material UI -
• 12 Language Dictionary...
Bro yarr tu itna achsee sikhata hai literally 1 bar me samaj ata hai sachi .....
Bro muje ak doubt tha aap reply karoge kya
Great stuff man! thank you for sharing your knowledge and great content!
And what about the productions, should I add the base url of the backend after deployment just same as shown in this for the localhsot
Awsome tutorial ! Its really helpful. Keep up the good work.
Sir, I am making an edtech website. I have some doubts , could you please answer them?. I have landing page (before log in) and dashboard page after log in. Should I use react for the whole website?. Or can I use just template engine ? But will user experience be good ? I am going to add video lecture section, online test . In this video is it client side rendering? Can I use server side rendering for landing page+ client side rendering for dashboard and other interractive functionalities? How can I do the same ?
Proxy error: Could not proxy request can connect front end to backend
why this happening, followed all stack overflow approaches.
plz help
how can we deploy such app, what configurations do we have to apply for deploying?
Hello sir, Actually I'm following your playlist one by one but I got stuck somewhere because I have an error to connect the notes.js and to bring or connect the backend to the frontend right inside the console after inspecting , even though I have been following your tutorial step by step. Kindly do me needful !!!
I really love and appreciate your method because it can be understood by quite beginners as well. the reference is starting from 5:40
Hey, try to compare your code with mine -
github.com/piyush-eon/notezipper
Thank you sir for your suggestions
same issue
Excellent tutorial,works great even for PERN,it worked for me
My English is not good, can u keep subtitles for your whole video 😘
Thank u bro
There will be auto-generated captions below, you can turn them on by clicking on cc
Thanks Sir. You are amazing.
Thank you so much. You save my life!!!
When we use proxy then frontend is not working completely
Is it generally good practice to have 2 package.json files like this?
Yeah both are isolated from each other, if you don't wanna do this, create separate folder for both backend and frontend
Can you tell me why you use "npm start" instead of "npm run start"?
its the same thing
OMG i had my editor open when to cook dinner come back and my cat had jump up on my desk and wipe out my server js file Had to go back and do the server Part again Lol, anyway Did it again and got part 8 done to and its working great My teacher ok head to part 9 Now
Lol
10:41 Concurrently. Very useful tool
I couldn't get it to work. I had to revert back to what I had because using concurrently completely broke my site
After setting proxy still I'm getting same error
Can we use cors insted of setting proxies in 6:27...just curious
Yes
thank you !!
Hi am getting this error
[0] Error: Cannot read property 'host' of undefined
Thank you so much yarrrrrr, I just found...where I'm making a mistake 🥺🥺🥺🥺🥺
I am getting this error at 7:14 = React Hook "useEffect" cannot be called at the top level. React Hooks must be called in a React function component or a custom React Hook function react-hooks/rules-of-hooks
Yeah use hooks inside of a function
maybe you have typed "myNotes" then inside that used "useEffect". Just change the name "myNotes" to "MyNotes"......Maybe it may help you
event after adding proxy my api is hitting on locaalhost:3000. hence getting bad request. Any idea how to resolve?
Did you ever figure this out? I am having the same problem
I'm having the same.
me too!
Guys I added cors to the sever.js and changed the get call to the previous one so "localhost:5000/api/notes" instead of "api/notes/" and it logs the object as intended I guess
Have you got the solution for it @@ANKITKUMAR-ih3yk
i am follwing the tutorial but I am getting 401 (Unauthorized) do you have an idea how to solve this ?
Try to compare your code with mine, must be some typo. Link in description
good video
Thank you
Welcome
You are a star!
sir have u telegram channel ??
t.me/roadsidecoderofficial
Sir also my concurrently is not working too I hv tried every possible trick
Did you compare with my code?
Contact me on instagram @RoadsideCoder
Ok Sir I'm going to contact you on instagram
concurrently command not working for frontend
check again, must be a typo
@@RoadsideCoder issue fixed thanks though!
@@yolla_4 How did you fix it please
@@yolla_4 How did you fix it please
0:08 why on earth would you move this picture preventing people from concentrating and reading.
it is possible to pull out a man from india but pull out india from man is not so easy.
i have some queries to ask to you about this video plz read my comment and tell me
Yes bro, Ask me.