Skip to content

A simple web API built using Sinatra, PostgreSQL, Rspec, and Factory Girl

Notifications You must be signed in to change notification settings

salsanads/sinatra-api-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sinatra API Sample

A simple web API built using Sinatra, PostgreSQL, Rspec, and Factory Girl.

How to Run

  1. Install Bundler
gem install bundler
  1. Install Gems
bundle install
  1. Copy sample.env to .env
cp sample.env .env
  1. Run Migration
rake db:create
rake db:migrate
  1. Add Seeds (Optional)
rake db:seed
  1. Run shotgun on terminal
shotgun
  1. Access it at http://127.0.0.1:9393/users

How to Run inside Docker

  1. Build Image
docker build . -t salsanads/sinatra-api-sample
  1. Run Image
docker run --net=host -d -p 9393:9393 salsanads/sinatra-api-sample
  1. Access it on the host at http://127.0.0.1:9393/users

How to Run Test

  1. Install Bundler
gem install bundler
  1. Install Gems
bundle install
  1. Run Rspec
bundle exec rspec

About

A simple web API built using Sinatra, PostgreSQL, Rspec, and Factory Girl

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages