DEV Community

Discussion on: What localhost do I use? 3000/gql , 5000/gql

Collapse
 
nhidtran profile image
nhidtran • Edited

if you react app is running on port 3000
and your graphql server is running on port 5000, you'll want to make requests from your react app to fetch data
The port numbers are arbritary. You could make your react app run on 5000 and your server something like 9999. The number itself really doesn't matter, but think of it like addresses. One thing is running per address (like a house!). If you're at house 3000, you might call house 5000 for something

you can verify your server is returning the right data by postman or curl your request

you can also post your repo if you want some help hooking it all up! or if I'm not answering the question you trying to solve

Thread Thread
 
yobretyo profile image
Bret

Ok ๐Ÿ‘ I added the cors, but itโ€™s still not showing. I think it might be my actual query in the component. BUT, what is Schema.JS? Do I need that, OR, is that the gql folder on my client side??