Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.22 KB

README.md

File metadata and controls

48 lines (32 loc) · 1.22 KB

Bid Bros

About

This is the API service for Bid Bros

Setup

  1. Install Homebrew

    • ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install RVM

    • \curl -sSL https://get.rvm.io | bash -s stable --ruby=2.2.2
    • rvm use 2.2.2 --default
    • rvm gemset create bidbros
    • rvm use 2.2.2@bidbros --default
  3. Install Postgres

    • brew install postgresql
    • Follow the below post install steps for postgres:
      • To have launchd start postgres at login:
        • ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
      • Then to load postgres now:
        • launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  4. Change the username in config/db.yml to your username

  5. gem install bundler

  6. bundle install

  7. Create the Postgres databases

    • bundle exec rake db:create
    • bundle exec rake db:create RACK_ENV=test
  8. Run the database migrations

    • bundle exec rake db:migrate
    • bundle exec rake db:migrate RACK_ENV=test

Running the server

  1. bundle exec rackup
    • This will start the server on port 9292 by default

Running the console

  1. bundle exec rake console