Module: Pith::Server

Extended by:
Server
Included in:
Server
Defined in:
lib/pith/server.rb

Defined Under Namespace

Classes: OutputFinder

Instance Method Summary collapse

Instance Method Details

#new(project, options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/pith/server.rb', line 9

def new(project, options = {})
  Rack::Builder.new do
    use Rack::ShowExceptions
    use Rack::Lint
    use Rack::Livejs if options[:auto_reload]
    use Pith::Server::OutputFinder, project
    run Rack::Directory.new(project.output_dir)
  end
end