Introduction:
If you're a developer who's just starting out with the MERN stack, you may be wondering how to deploy your project for...
For further actions, you may consider blocking this person and/or reporting abuse
after deployemnt i try to post the data frontend to backend it's perfectly send the data...but after page refresh it's show page not found...
@vasip2f Can you provide more details?
Hi @vasip2f . That may be caused because the page name is looking for after refresh.
Let's say you have a get request for data in a page yoursite/api/get. After refresh it may looking only for /api/get, so it means you will have to set a redirect in your express server.
how to do that? is it like this -
Thanks bruh!! , works like a charm :)
best article!!
Got this error , when deployed the server side code
{"error":"Endpoint not found"}
Here's the link : notable-app-new.onrender.com/
Here's the code: github.com/whosmudassir/mern-app-t...
I get this error on deployment of the backend:
cd backend && node app.js
Nov 5 02:18:35 PM
Nov 5 02:18:37 PM /opt/render/project/src/backend/node_modules/bson/lib/bson.cjs:479
Nov 5 02:18:37 PM inspect ??= defaultInspect;
Nov 5 02:18:37 PM ^^^
Nov 5 02:18:37 PM
Nov 5 02:18:37 PM SyntaxError: Unexpected token '??='
Nov 5 02:18:37 PM at wrapSafe (internal/modules/cjs/loader.js:984:16)
Hi! I recently finished my first MERN project using the create-react-app method above, which has now been depreciated. How would you suggest starting a new MERN project without create-react-app? The current documentation suggests using Next.js, but I'd like to avoid learning another framework until I am comfortable with using the MERN stack. Thanks in advance!
Your blog is good, but this basic Setup is almost covered by everyone who shares, please go beyond this basic initital MERN stack deployment, its a request. If you really want to post somehting great then post a blog for having some endpoints, having authentication and authorization, middlewares included, because api endpoints does not work properly or completley for most of the people learning and trying, beyond the initial routes '/' or base url! Please post on this having configurations and setup needed for correctly accessing all endpoints on deployed url. Please do post a blog for this. AND as CRA is deprecated so please post it using Vite React JavaScript if possible.
Website deployed successfully but data is not able to get or post. How to fix it?
Maybe you haven't configured your frontend to request the backend.
Thankyou for replying, Can you please check the repo github.com/Sourav928/Maadhyam-Bloging.
Any Changes please let me know.
Thank you sooooooo much for this helpful tutorial ! :)
Thank you for this guide helped a lot
does the location matters, India is not shown as an option. does that cause any trouble ? should i use a vpn to access after hosting?
Not really
After this how can i run or how can i get the frontned in live site
Thank you, Its really helpful