This application displays data about countries and consists of two parts: the backend and the frontend.
- Display country-specific data such as name, flag, region, population and borders.
- Fetches data from external APIs.
- JavaScript
- Frontend: React, Axios
- Backend: Node.js, Express
- APIs used:
-
Navigate to the
frontend
directory. -
Install the necessary dependencies:
npm install
-
Create a
.env
file with the following content:REACT_APP_API_URL=http://localhost:3001/
-
Start the frontend development server:
npm start
-
Navigate to the
backend
directory. -
Install the necessary dependencies:
npm install
-
Create a
.env
file with the following content:
PORT=3001
DATE_NAGER_BASE_URL=https://date.nager.at/api/v3/
COUNTRIES_NOW_BASE_URL=https://countriesnow.space/api/v0.1/
-
Start the backend server:
npm start
- Start both the frontend and backend servers.
- Open the application in your browser at
http://localhost:3000
. - Browse the country data!