This repository illustrates a simple Go
microservice that allows a user to register, login, add and query books from their library. The API makes use of JWT
to control authorization for the Add-a-book and List-books endpoints. All data in PostgreSQL
database is persisted in a PostgreSQL container. The Go Logrus
library is used for structured logging to record API access and transactional activities.
- Grab the repository
$ git clone https://github.com/bensonmacharia/book_store_api.git
- Configure the environment variables
Make sure to edit the variables inside <<>> to set up your custom configuration.
$ cd book_store_api $ cp .env.example .env
- Run the application
$ docker-compose up -d #Confirm the containers have been created and are running $ docker ps
Follow this guide to deploy this application on AWS - https://lnkd.in/d3qTv74h
The guide will illustrate how to deploy the application on
AWS EKS
, persist the database in anAWS EFS
and ship logs toAWS CloudWatch
with the aid of theFluent Bit
daemon.