Anonymous961 / Workout_Buddy

The MERN Stack Workout Web App is a comprehensive and user-friendly application designed to help individuals track and manage their workout routines effectively. This app combines the power of MongoDB, Express.js, React.js, and Node.js to create a seamless and efficient experience.
https://workout-buddy-omega.vercel.app/
1 stars 1 forks source link

Couldn't Deploy #1

Closed aniket-kes closed 1 month ago

aniket-kes commented 3 months ago

I saw you have deployed the project, i also tried to do it but i m getting stuck.

Like i have deployed my backend on render an then tried running my frontend on localhost and it is working absolutely fine but when i deployed the frontend on vercel i can see the the pages rendering properly but when i tried login the app, i couldn't able to get logged in i have got the error as "Cannot POST on this api/v1/login".

Anonymous961 commented 3 months ago

@aniket-kes Most likely, the problem is with the environment variable on Vercel. Go to the project settings on Vercel and check for your deployed backend URL in the environment variables. I'm guessing you might have forgotten to put your backend deployed URL in the environment variable. If that's not the case, then I might need to take a look.

aniket-kes commented 3 months ago

i actually have used the proxy in package.json where i simply put the backend URL of render. Hence, i didn't created any environment variable in my client side. I looked into your code specifically .env in frontend you have used the vercel for deploying the backend am i right ? i am using Render for deploying the backend coz i didn't knew that i could deploy my backend on vercel.

Anonymous961 commented 3 months ago

I've never tried proxy in deployment. Maybe that's the reason backend url is not working. Ensure deployed URL is working correctly in postman. Maybe putting cors in server instead of using proxy at frontend will help you. I'm not sure what I've used here. You can see last changes were more than year ago.