Skip to content

yonatankarp/cat-fact-service

Repository files navigation

Cat Fact Service

Type Status
CI pipelines Release Gradle Upgrade CI

A simple cat fact service application, service a JSON endpoint and using the cat-fact client library to get the facts about cats.

This is the example application described in the article LINK TO ARTICLE

Running the project

To build the project, run the following commands:

$ ./gradlew build
$ docker compose up

You can now hit the endpoint

$ curl http://localhost:8080/api/v1/cat/facts

You can set the number of facts (1 to 10) using the query parameter max as follows:

$ curl http://localhost:8080/api/v1/cat/facts?max=3

If the value is higher than 10, it would be clamped to 10, and if it is lower than 1, it would be clamped to 1.

Alternatively, you can pull the final docker image from GHCR:

$ docker pull ghcr.io/yonatankarp/cat-fact-service:latest

Authors

About

A weather services services JSON response using the WeatherApi client

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •