sef-global / scholarx-frontend

This is the frontend of the ScholarX
MIT License
5 stars 57 forks source link

Fix the issue where the backend API URL was not configurable. #70

Closed mayura-andrew closed 10 months ago

mayura-andrew commented 10 months ago

Purpose

The purpose of this PR is to fix #69

Goals

This PR makes the backend API URL configurable through the VITE_API_URL environment variable. This allows the application to connect to different backend APIs depending on the environment.

Approach

I updated the README.md file to include instructions on how to set the VITE_API_URL environment variable. See the changes in this PR for more details.

Screenshots

N/A

Checklist

Related PRs

N/A

Test environment

OS - Fedora Linux 39 (KDE Plasma) x86_64 NodeJS - 20.10.0

Learning

I learned about the importance of making backend API URLs configurable to support different environments. I also learned about Vite's support for loading environment variables.

mayura-andrew commented 10 months ago

Got it, previously I implemented this approach and removed. I'll update this