A simple web API built using Sinatra, PostgreSQL, Rspec, and Factory Girl.
- Install Bundler
gem install bundler
- Install Gems
bundle install
- Copy
sample.env
to.env
cp sample.env .env
- Run Migration
rake db:create
rake db:migrate
- Add Seeds (Optional)
rake db:seed
- Run
shotgun
on terminal
shotgun
- Access it at http://127.0.0.1:9393/users
- Build Image
docker build . -t salsanads/sinatra-api-sample
- Run Image
docker run --net=host -d -p 9393:9393 salsanads/sinatra-api-sample
- Access it on the host at http://127.0.0.1:9393/users
- Install Bundler
gem install bundler
- Install Gems
bundle install
- Run Rspec
bundle exec rspec