Created
February 6, 2011 03:30
-
-
Save queso/813087 to your computer and use it in GitHub Desktop.
An example config.ru file for dynamically adding CIJoe projects, just place this at the root of your folder structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Required so that we can set path correctly for Config, which | |
# is loaded statically due to a bug in cijoe | |
require 'cijoe' | |
# setup middleware | |
use Rack::CommonLogger | |
# Assume all subfolders under config.ru are git repos and collect them to spin up multiple joes | |
projects = Dir.glob("*/") | |
# configure joe per project | |
projects.each do |project| | |
project_path = Dir.pwd + "/" + project | |
map "/#{project}" do | |
run CIJoe::Server.rack_start(project_path) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment