Margaret-Petersen / Margaret-Petersen/uber-eats-clone-using-react-native

Need help run in localhost

Open
#1,119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
The backend is up and running (verified by http://localhost:8001/graphql)
The front end runs normally with the default config (https://enatega-multivendor.up.railway.app)

But when I switch to my local host (http://localhost:8001), frontend keeps showing the spinning circle.

my .env

PORT=8001
CONNECTION_STRING=mongodb+srv://user123:password123@clusterdemo.rcts9.mongodb.net/?retryWrites=true&w=majority
RESET_PASSWORD_LINK=auth/reset/?reset=
SERVER_URL=http://localhost:8001
STRIPE_WEBHOOK_ENDPOINT_SECRET=
DASHBOARD_URL=http://localhost:3001
WEB_URL=http://localhost:3002
ORDER_DETAIL_WEB_URL=order-detail/

REDIS_HOST=redis
REDIS_PASSWORD=
REDIS_PORT=6379

NODE_DEV=production
NODE_ENV=production
SENDGRID_API_KEY=
my constants.js

// const SERVER_URL = 'https://enatega-multivendor.up.railway.app'
// const WS_SERVER_URL = 'wss://enatega-multivendor.up.railway.app'
const SERVER_URL = 'http://localhost:8001'
const WS_SERVER_URL = 'ws://localhost:8001'

My admin dashboard

Screenshot from 2024-11-19 19-25-17

Update, from the debug console of admin-dashboard

Screenshot from 2024-11-19 19-20-37

everytime I reload the admin-dashboard

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the .env values and constants.js, then reproduce the localhost configuration in the admin-dashboard while watching its debug console. Compare the local frontend requests with the working default configuration; the issue is done when the frontend loads without the spinning circle against http://localhost:8001.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
full-stack
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.