Module | Mongrel::Camping
In: | lib/mongrel/camping.rb

Support for the Camping micro framework at camping.rubyforge.org This implements the unusually long Postamble that Camping usually needs and shrinks it down to just a single line or two.

Your Postamble would now be:

      Mongrel::Camping::start("0.0.0.0",3001,"/tepee",Tepee).join

If you wish to get fancier than this then you can use the Camping::CampingHandler directly instead and do your own wiring:

      h = Mongrel::HttpServer.new(server, port)
      h.register(uri, CampingHandler.new(Tepee))
      h.register("/favicon.ico", Mongrel::Error404Handler.new(""))

I add the /favicon.ico since camping apps typically don‘t have them and it‘s just annoying anyway.

### Methods

start

### Classes and Modules

Class Mongrel::Camping::CampingHandler

### Public Class methods

start(server, port, uri, klass)

This is a convenience method that wires up a CampingHandler for your application on a given port and uri. It‘s pretty much all you need for a camping application to work right.

It returns the Mongrel::HttpServer which you should either join or somehow manage. The thread is running when returned.

[Validate]