module Camping
The Camping
Server
(for development)¶ ↑
Camping
includes a pretty nifty server which is built for development. It follows these rules:
-
Load all
Camping
apps in a file. -
Mount those apps according to their name. (e.g. Blog 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.
Run it like this:
camping blog.rb # Mounts Blog at /
And visit localhost:3301/ in your browser.