Pollinate Prime service demonstrates and calculates the list of prime number that are present between the number provided. It takes a number as a request URL path variable and calculates the prime number present from 1 to input number.
You can clone this public repo by using git clone.
- Maven
- JDK 11 or above
- Docker
- Git
- After cloning please move to Pollinate folder.
- Run
mvn clean installto install the maven dependencies - Run
mvn spring-boot:runto run the application. - The service would be running by default at port 8080.
- Url to test - it only supports GET method.
localhost:8080/primes/10
- A docker image has been published publically to dockerhub.
- you need a local docker daemon running and then pull the image
- Use command:
docker pull ateev99/primes:production - Once image is pulled then you can run a container using
docker container run -it -d --name primesrvscntr -p 8080:8080 ateev99/primes:production - Application would be up and running on localhost:8080/primes/10
- Postman collection 'Pollinate Prime.postman_collection.json' has been kept in Pollinate folder which can be imported via Postman to run and test the service.
- A request with name
Get Primeshas been added to this collection. It has two requests: 1. Get Primes - JSON 2. Get Primes - XML.
- application logs can be accessed inside
applicationLogsfolder. File name primeslogs has been created.