This is a simple React application that displays a list of books fetched from an API. It's built using React and Vite.
- Fetches and displays a list of books from an API
- Handles and displays errors if the API request fails
- Uses environment variables for API configuration
Before you begin, ensure you have met the following requirements:
- You have installed Node.js (version 14.0 or later recommended)
To install and run the Book List App, follow these steps:
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory of the project and add the following line, replacing the URL with your API base URL:VITE_API_BASE_URL=http://your-api-base-url
-
Start the development server:
npm run dev
-
Open your web browser and navigate to
http://localhost:5173
(or the port shown in your terminal).