Skip to content

Instantly share code, notes, and snippets.

@thomasyip
Created October 26, 2011 05:41
Show Gist options
  • Save thomasyip/1315550 to your computer and use it in GitHub Desktop.
Save thomasyip/1315550 to your computer and use it in GitHub Desktop.
Minimal Sinatra Example
# /slim/slim.rb
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
require 'rubygems'
require 'sinatra'
class AppMain < Sinatra::Application
set :root, APP_ROOT
get '/' do
redirect '/app.html' # found in public/
end
end
@thomasyip
Copy link
Author

See, https://gist.github.com/1315555 for /config.ru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment