This is a simple API Code Example for consume F1 historical results
Features:
- Spring Boot
- Swagger
- PostgreSQL
- Mockito
- Pagination
- JWT
- JaCoCo
- mvn Profiles
- GitHub Actions
- GitHub Secrets
- GitHub Badges
- Unit testing with embedded DB (h2 engine)
- Docker build and push to Docker Hub
- Docker compose files for API and DB Only
- Updated until Saudi Arabian Grand Prix *
- Java 8
- Maven
- Docker
- (Optional) PostgreSQL Server
- This is only necesary only if you want to create your DB from scratch
git clone https://github.com/afv9988/F1-Results-API.git
mvn clean install
- Init docker compose for only db (This can take a long)
docker-compose -f docker/run_only_db.yml up
- Or use my public db on your properties file
jdbc:postgresql://afdev.ddns.net:5432/f1_db
username=f1_user
passw=a912072
.\mvnw.cmd spring-boot:run
docker-compose -f docker/run_API_and_postgres.yml up
For access the Demo you need to generate a token here or
curl -X GET "http://afdev.ddns.net/token?password=NEW_USER&username=NEW_PASSWORD" -H "accept: */*"
Then authenticate in Swager on JWT apiKey For external use of token add -H "Authorization: YOUR-TOKEN-GENERATED"