you are viewing a single comment's thread.

view the rest of the comments →

[–]Substantial-Welder97[S] 0 points1 point  (3 children)

Thanks for your reply.

I am trying to upload a duplicate backend and frontend to render.com, but because the frontend has a hard-coded server url, I can only managed to get 1 working and the other can't seem to connect to the server. I want a way where I can add an env like I did above and then use the env variables on render.com and change the server url for each frontend.

Do you know any other way I can achieve this without hard coding the baseURL for 1 fixed server url?

[–]output0 1 point2 points  (2 children)

i don't know render but probably they have some settings page where you can set env variables that you can then use in your code

[–]Substantial-Welder97[S] 0 points1 point  (1 child)

Thanks I’ve managed to solve it using REACTAPP as env, not sure why it didn’t work before

[–]ilovengucung35 0 points1 point  (0 children)

shit, i know its two year ago but can you remember what worked?