Skip to content

symbios-zi/books_lib

Repository files navigation

Simple library API

SETUP

To setup infrastructure you should follow step described below:

  1. Run composer install in the application dir
  2. Copy .env.example to .env
  3. Go to dir .docker cd .docker and run docker-compose up -d
  4. Run docker-compose exec app php artisan migrate
  5. Run docker-compose exec app php artisan db:seed --class="AuthorSeeder"
  6. Run chmod -R 777 storage in app directory to allow write logs.

TESTS

To start tests u should run command ./vendor/bin/phpunit inside app container
You can connect to this container using command docker-compose exec app bash

API

The url of app is http://localhost:8080/

[POST] /api/v1/scan
[GET] /api/v1/books - accept parameters: from_year, to_year, author_full_name
[GET] /api/v1/cds - accept parameters: from_year, to_year, author_full_name
[GET] /v1/authors/average - accepts parameter: author_full_name

LOGS

All operations of storing data will be logged into file storage/logs/scan.log

UML

Alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published