- Nodejs with express freamwork
- postgressql with sequelize ORM tool
- download the repository
npm install
to install all the dependencies- run your database server
- create a database it's called "yazan-alshekha"
- create a
.env
file as a copy from.env.sample
file nodemon
to run your nodejs server
https://restcountries.com/v3.1/all
to get the data from the api provided and save the response to our database.
Note : we should hit it only one time to avoid duplicate the data inside the database
Examples :
- http://localhost:3000/countries
- http://localhost:3000/countries?cca2=IO
- http://localhost:3000/countries?cca3=COG
- http://localhost:3000/countries?ccn3=296
- http://localhost:3000/countries?name=Romania
Example :
Examples :
- http://localhost:3000/group_countries?language=english
- http://localhost:3000/group_countries?region=Americas
Note : you need to add aheader (X-ADMIN=1) to be authorised admin