manikandanraji/twitter-clone-frontend

Linking to Backend

Closed this issue · 1 comments

So this is probably a stupid question, but I'm trying to deploy this application so I can use it and make some changes. I've deployed my backend to Heroku by following the instructions in the backend repo. I've deployed my frontend to Vercel (formerly ZEIT Now). How do I link the two? Is that what the endpoint env vars are for? The Heroku URL just shows the GraphQL IDE, which I assume is correct.

Thanks in advance,
@gideon357

yep, you need to use env vars for connecting the frontend and backend. By default, if you start the backend server on your local machine, it'll start listening for requests at port 7777. So, you should have .env file in your frontend repo with the following contents:

carbon (1)