Created
February 11, 2009 12:47
-
-
Save daddz/61990 to your computer and use it in GitHub Desktop.
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
# use local copy of sinatra | |
$LOAD_PATH.unshift File.dirname(__FILE__) + '/sinatra/lib' | |
require "rubygems" | |
require "sinatra" | |
# Map static files | |
use Rack::Static, :urls => ["/images", "/stylesheets", "/javascripts"], :root => "public" | |
# Map URLs to diffrent sinatra apps | |
map "/user/" do | |
run Sinatra("app/user/user.rb") | |
end |
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
$:.unshift File.join(File.dirname(__FILE__), "..", "lib") | |
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
"Hello World" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment