Simple Shopping Cart API
- Ruby 2.5.1
- Some database to store products (tested on PostgreSQL 10)
- Install required ruby version (
rvm install 2.5.1
orrbenv install 2.5.1
) - Install Bundler
gem install bundler
- Copy
config/database.yml.example
toconfig/database.yml
and configure the database - Run
./bin/setup
The simpliest way is to use http command.
http POST https://rails-cart-api.herokuapp.com/api/cart product_id=1 quantity=5