0
# * Camping::Helpers which can be used in controllers and views.
0
+# == The
Camping Server0
-# Most Camping applications contain the entire application in a single script.
0
-# The script begins by requiring Camping, then fills each of the three modules
0
-# described above with classes and methods. Finally, a postamble puts the wheels
0
+# How do you run Camping apps? Oh, uh... The Camping Server!
0
-# Camping::Models::Base.establish_connection :adapter => 'sqlite3',
0
-# :database => 'blog3.db'
0
-# Camping::Models::Base.logger = Logger.new('camping.log')
0
-# Camping.create if Camping.respond_to? :create
0
+# The Camping Server is, firstly and thusly, a set of rules. At the very least, The Camping Server must:
0
-# In the postamble, your job is to setup Camping::Models::Base (see: ActiveRecord::Base)
0
-# and call Camping::run in a request loop. The above postamble is for a standard
0
-# CGI setup, where the web server manages the request loop and calls the script once
0
+# * Load all Camping apps in a directory.
0
+# * Load new apps that appear in that directory.
0
+# * Mount those apps according to their filename. (e.g. blog.rb is mounted at /blog.)
0
+# * Run each app's <tt>create</tt> method upon startup.
0
+# * Reload the app if its modification time changes.
0
+# * Reload the app if it requires any files under the same directory and one of their modification times changes.
0
+# * Support the X-Sendfile header.
0
-# For other configurations, see
0
-# http://code.whytheluckystiff.net/camping/wiki/PostAmbles
0
+# In fact, Camping comes with its own little The Camping Server.
0
+# At a command prompt, run: <tt>camping examples/</tt> and the entire <tt>examples/</tt> directory will be served.
0
+# Configurations also exist for Apache and Lighttpd. See http://code.whytheluckystiff.net/camping/wiki/TheCampingServer.
0
# == The <tt>create</tt> method
0
@@ -658,17 +655,7 @@ module Camping
0
# at the center, passing in the read +r+ and write +w+ streams. You will also need to mimick or
0
# pass in the <tt>ENV</tt> replacement as part of your wrapper.
0
- # Camping::Models::Base.establish_connection :adapter => 'sqlite3',
0
- # :database => 'blog3.db'
0
- # Camping::Models::Base.logger = Logger.new('camping.log')
0
- # req.out << Camping.run req.in, req.env
0
+ # See Camping::FastCGI and Camping::WEBrick for examples.
0
def run(r=$stdin,e=ENV)
Comments
No one has commented yet.