Camping Server layout diagram.

The Camping Server is basically a set of rules. At the very least, The Camping Server must:

  • Load all Camping apps in a directory.
  • Load new apps that appear in that directory.
  • Mount those apps according to their filename. (e.g. blog.rb is mounted at /blog.)
  • Run each app's create method upon startup.
  • Reload the app if its modification time changes.
  • Reload the app if it requires any files under the same directory and one of their modification times changes.
  • Support the X-Sendfile header.

bin/camping

Camping comes with a very simple version of The Camping Server. bin/camping uses either WEBrick or Mongrel (if you have it installed.)

Run it like this: camping /var/www/camping/*

It will follow all of the rules above.

Web Server Recipes

Attachments