Skip to content

DuckTales-Projects/bookstore

Repository files navigation

BookStore

codecov codebeat badge code_analizers

Welcome to my bookstore API!

System dependencies

if you are not going to use docker:
* Ruby 3.1.0
* PostgreSQL

if you are going to use docker:
* Docker
* Docker-compose

Usage

If you are not going to use docker:

First install and configure the database (PostgreSQL).

# clone the project
git clone https://github.com/DuckTales-Projects/bookstore.git

cd bookstore           # => enter the projector directory

gem install bundler    # => install bundler

bundle install         # => install gems

bin/rails db:prepare   # => prepare the database

bundle exec rspec      # => to run the tests

bin/rails s            # => to start server

bin/rails c            # => to start console

If you are going to use docker:

With dependencies satisfied, run the following commands:

# clone the project
git clone https://github.com/DuckTales-Projects/bookstore.git

cd bookstore     # => enter the projector directory

script/run   # => to build, run docker images and run the server

script/shell   # => to run shell in container

# inside the container
be rspec         # => Same as "bundle exec rspec" (run tests)

bin/rails c      # => start console

Accessing the application

Run the server, open the browser and access http://localhost:3000/.

You should see the following screen:

Welcome screen

Access API documentation to find out how to make requests. (Under construction)