Skip to content

refactor: use environment config for API base URL#289

Open
avinxshKD wants to merge 1 commit intoControlCore-Project:devfrom
avinxshKD:refactor/api-base-url-config
Open

refactor: use environment config for API base URL#289
avinxshKD wants to merge 1 commit intoControlCore-Project:devfrom
avinxshKD:refactor/api-base-url-config

Conversation

@avinxshKD
Copy link

Extracted the hardcoded http://127.0.0.1:5000 into a configurable constant that reads from process.env.REACT_APP_API_BASE_URL, making it easier to deploy the frontend against different backend environments.

Fixes #272

Changes:

  • Added API_BASE_URL constant to config.js with env var fallback

  • Replaced hardcoded URLs in 6-server.js (7 occurrences)

  • Replaced hardcoded URL in ContributeDetails.jsx (1 occurrence)

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

Successfully merging this pull request may close these issues.

1 participant