Add a cusom Resin server for rendering the right views for /<username>

This commit is contained in:
R. Tyler Croy 2012-04-12 20:29:09 -07:00
parent 132df685d8
commit 62ff4aa9e7
1 changed files with 19 additions and 0 deletions

19
despair.rb Normal file
View File

@ -0,0 +1,19 @@
require 'rubygems'
require 'resin/app'
module Despair
class Server < Resin::Server
get '/favicon.ico' do
halt 404
end
get '/:name' do |name|
haml :project, :locals => {:project => name}
end
end
end
if __FILE__ == $0
Despair::Server.run!
end