Skip to content

Instantly share code, notes, and snippets.

@daddz
Created February 11, 2009 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save daddz/61990 to your computer and use it in GitHub Desktop.
Save daddz/61990 to your computer and use it in GitHub Desktop.
# 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
$:.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