Skip to content

refactor: replace hardcoded API base URL with environment variable an…#114

Open
Uday9909 wants to merge 1 commit intoc2siorg:mainfrom
Uday9909:fix/env-variable-api-url
Open

refactor: replace hardcoded API base URL with environment variable an…#114
Uday9909 wants to merge 1 commit intoc2siorg:mainfrom
Uday9909:fix/env-variable-api-url

Conversation

@Uday9909
Copy link

This pull request fixes #83

Description

Removed hardcoded backend URLs and introduced a shared axios instance using an environment variable.

Changes

  • Added webapp/src/api.js
  • Added VITE_API_BASE_URL via .env.example
  • Updated all components to use centralized API module
  • Removed direct axios + hardcoded URLs

Testing

  • Verified API calls still function locally
  • App renders correctly

…d shared axios instance

- Added shared api.js module
- Introduced VITE_API_BASE_URL via .env
- Removed hardcoded backend URLs across components

Fixes c2siorg#83
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.

Replace Hardcoded API Base URL with Environment Variable

2 participants