Skip to content

Latest commit

Β 

History

History
81 lines (55 loc) Β· 2.67 KB

README.md

File metadata and controls

81 lines (55 loc) Β· 2.67 KB

Countrys API πŸ§‘β€πŸ’»

Countrys-API

This project is an API that provides information about countries, including details such as name, description, continent, flag, images, and more. πŸ§‘β€πŸ’»

Basically, it's an API about countries that allows you to:

  • Query countries by name.
  • Query countries by continents.
  • Get information about famous places, hotels, flights, and gastronomy of the requested country.

Each REST method has security thanks to Spring Security, so to access each API method, you need to be authenticated and authorized through JWT.

What technologies did I use to create this project? πŸ§‘β€πŸ’»

  • Java 17
  • SpringBoot
  • JPA
  • Lombok
  • Flyway
  • MySQL

As a dependency manager, I used Maven.

All these technologies were used to create this project, they are widely used technologies in the Spring Boot with Java ecosystem.

Prerequisites πŸ§‘β€πŸ’»

To run this project, you need to have the following technologies installed on your machine:

  • Java SDK > 17
  • MySQL (> 8.0)
  • Insomnia to consume the API.

How to Run the Project on Your Machine?

  • The first thing you need to do is clone this repository.
  • You must create the "application.properties" file in the resource folder to add the connection string and thus be able to connect to the database.
  • Create an environment variable called JWT_SECRET so that you can create JWTs and authenticate users.

That's it! This is how you can have the project on your machine to run.

API References πŸ§‘β€πŸ’»

Get all countries

 GET /paises
Type Description
string Devuelve un 200 con todos los paises listados.

Get countries by name

  GET /paises/pais/{nombre}
Parameter Type Description
nombre string Required. nombre del pais para hacer fetch

Get countries by continents

  GET /paises/continentes/{continente}
Parameter Type Description
continente string Required. nombre del continente para hacer fetch

πŸ§‘β€πŸ’» Credits πŸ§‘β€πŸ’»

Here are my different social medias where you can reach me: