This is a web application that displays NBA game scores for a given date. The user can toggle between showing the actual game scores, the score differences, and identifying clutch games (games with a score difference of fewer than 10 points).
-
Clone the repository:
Open your terminal and run the following command:
git clone https://github.com/idoamit8/nba-app.git
-
Navigate into the project directory:
cd nba
-
Install the dependencies:
In the project root directory, run:
npm install
-
SETUP a
.env
file under your root directory with the folowwing consts:NBA_API_KEY='your-nba-api-key'
- Can be create one at https://app.balldontlie.io
1.Start the Backend Server:
The backend server is a simple Express server that proxies requests to the NBA data API. Make sure your backend is running.
-
Navigate to your backend directory:
cd backend
-
Install backend dependencies:
npm install
-
Run the backend server:
npm start
-
Start the React Frontend App:
- Navigate back to the ui folder of the project:
cd ui
- Run the React app:
npm start
This will launch the React app in development mode and open http://localhost:3001 in your browser.