Skip to content

Add centralized API base URL configuration#1

Open
paste-03artless wants to merge 1 commit intomasterfrom
paste-03artless-patch-1
Open

Add centralized API base URL configuration#1
paste-03artless wants to merge 1 commit intomasterfrom
paste-03artless-patch-1

Conversation

@paste-03artless
Copy link
Owner

Description

What was changed

Introduced a single configuration file to define the API base URL using environment variables.

Why it was changed

Hardcoding API URLs across components makes environment switching (local, staging, production) error-prone. Centralizing this value improves maintainability and clarity.

How to test

  1. Set VITE_API_BASE_URL in the environment.
  2. Import the constant from the config file.
  3. Confirm the value matches the environment variable at runtime.

## Description
### What was changed
Introduced a single configuration file to define the API base URL using environment variables.

### Why it was changed
Hardcoding API URLs across components makes environment switching (local, staging, production) error-prone. Centralizing this value improves maintainability and clarity.

### How to test
1. Set `VITE_API_BASE_URL` in the environment.
2. Import the constant from the config file.
3. Confirm the value matches the environment variable at runtime.
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