This full-stack project was made with React, NodeJS and Express JS.
This program can display the basic information of all the countries in the world, including common names, capitals, areas, populations, and google Map locations.
I have deployed the project in https://rest-countries-api-frontend.vercel.app/
Have fun!
In this part, we put google Map shortUrl into the Google Map API,
then the database of Google Map will decode the URL and return the location.
I have deployed the backend part in https://rest-countries-api-backend.vercel.app/
In this part, we fetch the countries API from https://restcountries.com/v3.1/all. Put all the countries data in Array, then use map function to render each country.
First, we get the Link of every countries's name.
After we click the link, you can see the countries details.
In this Components, we can see all the countries details putting into a Card.
We use https://restcountries.com/v3.1/name/${name}` to select get the API according to the common name of the countries.
When we click "Show Country Detail", we can see all the countries details in this component.
This Components is used to connect with Backend, we get the location from backend and show them in the frontend.
-
Open integrated terminal of backend
-
then type "npm install"
-
then type "node server.js"
-
Open integrated terminal of frontend
-
then type "npm install --force"
-
then type "npm start"
Then you can see the project is running on http://localhost:3000/.
