Skip to content

lizstevens/image-service

Repository files navigation


README

Table of Contents
  1. About The Project
  2. Getting Started

About The Project

Hello!

I knew I wanted to build this with Spring Boot because I'm most familiar with Java honestly but I haven't specifically worked with this framework before. For the database I figured noSql would be the most simple. I was going to use Firebase but just decided to try MongoDB instead. For the public apis I Googled a different site with a cat api which also happened to have a dog api, no bears unfortunately. I initially wanted to use these endpoints because they advertised a parameter to get multiple images but turns out their limit parameter does not work right! So it is a single call per image.

Thanks :)

(back to top)

Built With

Java Spring Boot MongoDB Docker

(back to top)

Getting Started

Prerequisites

You'll need Docker to run this application if you don't already have.

  1. Go to the official Docker page: https://www.docker.com/get-started
  2. Install according to your OS
  3. Follow installation steps, most likely will need to restart, do that if prompted
  4. Open a terminal on your machine and run these just to verify
docker --version
docker compose version

Installation

Clone and go

  1. Open a terminal on your machine and navigate to the directory where you want to clone the repo
    cd chosen/path/example
  2. Clone the repo
    git clone https://github.com/lizstevens/image-service.git
  3. Navigate to the project
    cd image-service
  4. Spin up Spring Boot, MongoDB, and run automated tests
    docker compose up --build
  5. Open a browser and navigate to http://localhost:8080/
  6. You should see the prompt page

(back to top)

Usage

To Fetch and save random images of cats or dogs select either cat or dog. Enter how many using the arrows in the box prompt. Press submit. The images saved will display from left to right in the order saved.

To get the latest saved image press Get Latest Saved. The latest saved image will display.

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published