Skip to content

Instantly share code, notes, and snippets.

@brennandunn
Created March 8, 2012 14:45
Show Gist options
  • Save brennandunn/2001303 to your computer and use it in GitHub Desktop.
Save brennandunn/2001303 to your computer and use it in GitHub Desktop.
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
require 'toto'
Toto::Paths[:templates] = 'blog/templates'
Toto::Paths[:pages] = 'blog/templates/pages'
Toto::Paths[:articles] = 'blog/articles'
toto = Toto::Server.new do
set :author, 'Brennan Dunn'
set :title, 'Advice for the Savvy Freelancer'
set :url, 'http://www.projectorpm.com'
set :markdown, :smart
set :prefix, 'blog'
set :date, lambda {|now| now.strftime("%b %e, %Y") }
set :disqus, 'projectorblog'
end
map '/blog' do
run toto
end
map '/' do
run Projector::Application
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment