#!/bin/bash
cd "$(dirname "$0")"

# run server in which mode:
#   demo: by default set to use sqlite3 database
#   production: set to mysql2 database
export RACK_ENV=demo

# the location of buildwise workign folder
export BUILDWISE_HOME=~/work/sandbox/.buildwise

# migrate database
rake db_migrate

# start the server, -p <port_number>
#  puma is a web server, if not installed, change to rackup.  (bundle exec rackup -p 3618)   
bundle exec puma -p 3618

