-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch backend url #11
Comments
Hi @bjarman, basically, all you need to do is to change the |
I have tried this but the content is still fetched from https://live-contentacms.pantheonsite.io/api/recipes and not from my local cms. |
Hm, that's the only place that holds the URL of the backend. Alright, try |
..actually. The BACKEND_URL is set in package.json - this is where i have made changes like so: Both containers are on my localhost, on different ports, but are the containers aware of each other is what I mean. A container issue rather than an issue with react or cms? |
In package.json the env vars are just for now.sh environment, it does not affect your local environment. |
There is no BACKEND_URL variable in .env file. Should I add it manually? |
Are you sure you're looking at |
I have changed there as well but no change. Content is still from remote cms. |
what's the output if you log into the container with |
That echoes nothing. However looking in the .env file from within the container it has the correct BACKEND_URL. Very strange. |
Looks like you have some issues with your local set up. Not sure if I can help here, it requires a bit of debugging on your local. |
But how come that even though the .env file has the correct url but still gets the content from the live.contentacms site? That should be impossible right? |
I will start over with my local environment from scratch and see what happens. Still a bit mysterious though. If you leave this issue open for a few days I will post back and let you know how it turns out and if I find out what was wrong. |
I've got the react frontend spun up working great but cant figure out how to point to my local backend, I've scanned code for pantheon, replaced every URL, run make down, make install, make up and it's still connecting to pantheon, can you help? |
@timrabbetts as far as I recall, you need to change the URL in the .env file in the root of the repository and then restart the environment ( |
Hi! This is not an issue but rather a question. I am successfully running the recipe demo locally and also the contenta cms both in docker.
I would like to connect the contenta_react_next to my local contenta cms to retrieve the recipes from the content there.
I have tried to accomplish this by changing the BACKEND_URL in my .env file and then doing make install and make up but the react interface still gets the content from the remote cms.
What must I do to get this working?
The text was updated successfully, but these errors were encountered: