This is a web application that allows users to input a country name and retrieve information about that country using data from restcountries.com. The application consists of a React frontend and a Node.js backend built with the Express framework.
-
Navigate to the 'backend' directory inside the 'country-info-app' directory.
cd country-info-app/backend
-
Install the required dependencies
npm install
-
Navigate to the 'frontend' directory inside the 'country-info-app' directory.
cd country-info-app/frontend
-
Install the required dependencies
npm install
-
Change the const API_URL in src/App.jsx to "http://localhost:8080/country-info" if running app locally.
-
In the 'backend' directory inside the 'country-info-app' directory, start the Node.js server
node server.js
The Node.js express server will be running on http://localhost:8080.
-
In the 'frontend' directory inside the 'country-info-app' directory, start the React app.
npm start
The React app will be running on http://localhost:3000.
- Open your web browser and go to http://localhost:3000 to access the application.
- Enter the name of the country in the input field.
- Click on the 'Get Country Info' button.
- The application will display information about the entered country.