Skip to content
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

All Functions not working when hosted on a server #89

Open
Neillbar opened this issue Dec 8, 2020 · 4 comments
Open

All Functions not working when hosted on a server #89

Neillbar opened this issue Dec 8, 2020 · 4 comments

Comments

@Neillbar
Copy link

Neillbar commented Dec 8, 2020

What you did:

Hi, i am hosting this on a CentOS server, this allows me and a friend to use it. I can access it but i am unable to save any changes on the console.

What happened:

When i try to save the changes to the path, i see it tries to save too localhost.
-> PUT http://localhost:4000/route where it should be saving to our server which in this case is something else.

Problem description:

I can access it, but looks like configurations are pointing to local host instead of the host where it is deployed on.

Suggested solution:

Could you please commit an update that has a fix for this ? thanks so much!

@dante0747
Copy link

dante0747 commented Apr 7, 2021

Hi. I know it's too late to respond. I'm just writing here for those who have faced the same issue.

You should change the following environment variables in docker-compose.yml:

REACT_APP_MOCKIT_SERVER_URL=http://localhost:3000
REACT_APP_MOCKIT_API_URL=http://localhost:4000

@ONEUM
Copy link

ONEUM commented Nov 27, 2021

Hi there, I can confirm that this issue is still present if deployed via cloned docker-compose on host A and accessed from host B.
The page gets loaded but if you try to edit existing or add new route the dialog in modal window does not close and stays permanent and nothing happens afterwards. Only thing one can do is close the modal.

@ONEUM
Copy link

ONEUM commented Nov 27, 2021

Hi. I know it's too late to respond. I'm just writing here for those who have faced the same issue.

You should change the following environment variables in docker-compose.yml:

REACT_APP_MOCKIT_SERVER_URL=http://localhost:3000
REACT_APP_MOCKIT_API_URL=http://localhost:4000

this env vars setting is already set this way and it is not working, any hint?

@rayjaymor85
Copy link

I know this post is 2 years old but I came across this exact same issue.

The advice from @dante0747 does in fact work - just replace "localhost" on these lines with your IP address if you're hosting on a lab or remote service. In my case the ip address of my docker server worked just fine (so if you access mockit on http://10.1.1.128:5000 then set these lines to:

REACT_APP_MOCKIT_SERVER_URL=http://10.1.1.128:3000
REACT_APP_MOCKIT_API_URL=http://10.1.1.128:4000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants