Skip to content

Commit

Permalink
Convert to a Sinatra::Base
Browse files Browse the repository at this point in the history
  • Loading branch information
loe committed Nov 1, 2010
1 parent 43299f7 commit 10ae6b0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app.rb
@@ -1,11 +1,11 @@
require 'rubygems' require 'sinatra/base'
require 'sinatra'
require 'erb'


get '/' do class App < Sinatra::Base
erb :"index.html" get '/' do
end erb :index
end


put '/' do put '/' do
puts "uploaded #{env['HTTP_X_FILENAME']} - #{request.body.read.size} bytes" puts "uploaded #{env['HTTP_X_FILENAME']} - #{request.body.read.size} bytes"
end end
end
9 changes: 9 additions & 0 deletions config.ru
@@ -0,0 +1,9 @@
require 'rubygems'
require 'bundler'
Bundler.setup

require 'app'

use Rack::Static, :urls => ['/css', '/javascripts'], :root => 'public'

run App
File renamed without changes.

0 comments on commit 10ae6b0

Please sign in to comment.