Skip to content

omaralsakka/World-s-Info-Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

World's Info Web app

URL:

https://worldsinfo.herokuapp.com/

💠 Project's goal:

This project is about creating a mini info application about all the countries in the world.
Additionally displaying the current weather of each country's capital.
The project started as a practice project for using React and Bootstrap but I will continue
to develope it more and add extra features.

📃 How it's done:

  • Upon launching, the app fetch from Rest Countries website the countries info and store it in a state.
  • Once search receives inputs, it checks if it's valid alphabetic letters or not.
  • Then if the search text generic, which means there are multiple countries that matches,
    the search limits up to 4 countries names only to display at once.
  • A card displays simple information about the country and on button click, it forwards
    to a full display page.
  • The button routes to a component that receives the country name and display it's info from the state.
  • An additional fetch happens with the country's name from OpenWeather website to get the current weather
    in the capital of this country.

▶️ Install the program:

  • git clone
  • npm install
  • create account in OpenWeather
  • copy your API Key
  • create .env file in root
  • write in .env file the following: REACT_APP_API_KEY=your api key here
  • npm start

🐞 Bug fix:

  • 02.08.2022
    Fixed error when searching with mac as the country Macau did not have a capital to display and that caused the app to crash

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published