aemloviji / apod-img-store

Project to grab APOD images and store it locally in PostgreSQL and provide image to user when it is requested

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

apod-img-store

Project to grab APOD images and store it locally in PostgreSQL and provide image to user when it is requested.

Project requirements: https://github.com/justty/golang-units/blob/main/unit-1.md

Requirements

Before you spin up API and it's infrastructure make sure you have

  • docker installed
  • Make installed

How to run

Tips: run make help or just make to see all available make targets

Only once

If you are running the system first time please call below target

make build

To spin-up API and Postgresql

make up

Request samples

cURL samples can be run from command line

/image-of-the-day

Make sure you change the date parameter before sending request

curl -X GET 'http://localhost:8080/image-of-the-day?date=YYYY-mm-dd'

/images

curl -X GET 'http://localhost:8080/images'

TODO

[] Low coupling achived by using interfaces. It will help us in feature to cover code with Tests.

About

Project to grab APOD images and store it locally in PostgreSQL and provide image to user when it is requested


Languages

Language:Go 88.4%Language:Shell 5.3%Language:Makefile 5.1%Language:Dockerfile 1.3%