diff --git a/README.md b/README.md index 1ccdf01..7a600ac 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,29 @@ ![](https://dl.dropboxusercontent.com/s/6vqm0w07skh906s/2014-05-18%20at%2003.27.png) -## Applications +## Running the example -- Blog -- Admin -- Dashboard +##### 1. Ensure RabbitMQ is installed and running + +On Mac OSX with homebrew you can install RabbitMQ with + +```bash +$ brew install rabbitmq +``` + +And start it using +``` +$ /usr/local/opt/rabbitmq/sbin/rabbitmq-server +``` + +##### 2. Setup and start all processes + +```bash +$ bin/run +``` + +##### 3. Open all three applications in browser + +- [Blog (http://localhost:5001)](http://localhost:5001) +- [Dashboard (http://localhost:5002)](http://localhost:5002) +- [Admin (http://localhost:5003)](http://localhost:5003) diff --git a/bin/run b/bin/run new file mode 100755 index 0000000..d52b2f7 --- /dev/null +++ b/bin/run @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e +set -x + +cd blog +bundle check || bundle install +rake db:migrate +cd .. + +cd dashboard +bundle check || bundle install +cd .. + +cd admin +bundle check || bundle install +rake db:migrate +cd .. + +cd config +bundle check || bundle install +rake rabbitmq:setup +cd .. + +which foreman > /dev/null 2>&1 || gem install foreman +foreman start