Skip to content

refactor: use environment config for API base URL#289

Closed
avinxshKD wants to merge 2 commits intoControlCore-Project:devfrom
avinxshKD:refactor/api-base-url-config
Closed

refactor: use environment config for API base URL#289
avinxshKD wants to merge 2 commits 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)

@pradeeban
Copy link
Member

Merge conflict here too...

@pradeeban
Copy link
Member

Resolving the merge conflict has given a PR with zero changes. Perhaps a merged PR has already implemented what you are trying to do here?

@avinxshKD avinxshKD closed this Feb 14, 2026
@avinxshKD
Copy link
Author

@pradeeban You’re right this PR became zero-diff because the same fix was already merged in #290 now due to conflicts, and I’ve closed this PR to avoid duplicate work

@pradeeban
Copy link
Member

Funny.
You were competing with yourself then. Anyway, merging wouldn't give a duplicate work into the code. It would introduce a meaningless empty merge commit into the dev branch. Not a big harm if that happens.

@avinxshKD
Copy link
Author

Haha looks like I set up a race and still managed second place. Funniest thing happened me on here 😭

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.

2 participants