-
Notifications
You must be signed in to change notification settings - Fork 19
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
Client - server port issue #11
Comments
The app should load in |
I am not trying to be dense. (at least not deliberately, but I don't mind if you call me names :-) ) The server is starting in localhost:8080. I can see the graphiql interface, I can use insomnia to call against it, etc. and the mutations and queries all work fine. I also see that when I edited line in Loader.re (in the client) as shown above - the server is logging to the console "/graphql" when the message arrives. (so there is connectivity). What I did notice in with Fiddler is that post request packet had no body after I modified Loader.re If I leave it (loader.re) alone, it does have a body, but then it sends the request to http://localhost/public/graphql (where there is no server) So I think I am not editing Loader.re in the React client properly. |
I don't know what to tell you. I haven't touched this app in a while and it worked when I pushed it. I'd encourage others to chime in if it's not working for them. I don't use Esy anymore so I can't double check if the setup works. |
So let me chime in this:
|
@anmonteiro you mention you no longer use Esy, What was the problem, and what do you use now? |
I found the problem. It is simple there is no header on the server to deal with the CORS issue:
Do you know who I should ask about how to add header on the responses for CORS" is it Cohttp_lwt_unix or Cohttp_lwt_unix.Server |
Trivial question: (BTW, very nice project, this helps me a lot)
I see the the sample client tries to connect to http://localhost/public which is not where the server is located.
I tried changing the line in Loader.re to:
But my newbie knowledge of Bs_fetch is obviously flawed. Fidder reports that this is what is being sent:
The text was updated successfully, but these errors were encountered: