Hello all,
I was able to get Medusa working locally and it's been great. I am trying to get it online so I can demo it to my partner but I've been having some difficulty with CORS and Heroku in particular. I used the nextjs-starter and the heroku auto deploy for the backend. The issue I'm having is as follows:
Storefront: https://skincandy.vercel.app/
Admin: https://skincandy-backend.vercel.app/
Backend: https://skincandy-230bb14ddb76.herokuapp.com/
I followed the docs and was able to get the majority of it working and hosted on Vercel, the issue is that I am unable to login to the backend and keep seeing CORS issues when I check the log in the browser. Also, Heroku seems to be crashing as well and not maintaining the server.
Here are the necessary environment variables for heroku:
ADMIN_CORS: https://skincandy-backend.vercel.app
STORE_CORS: https://skincandy.vercel.app
NODE_ENV: production
NPM_CONFIG_PRODUCTION: true
Here are the env variables for the storefront:
NEXT_PUBLIC_BASE_URL: https://skincandy.vercel.app
NEXT_PUBLIC_MEDUSA_BACKEND_URL: https://skincandy-230bb14ddb76.herokuapp.com
MEDUSA_ADMIN_BACKEND_URL: https://skincandy-230bb14ddb76.herokuapp.com
Here are the env variables for the admin:
MEDUSA_ADMIN_BACKEND_URL: https://skincandy-230bb14ddb76.herokuapp.com
ADMIN_CORS: https://skincandy-backend.vercel.app
Lastly, here are the logs from Heroku (Image attached). Appreciate any help i can get, thank you!!