public
Description: Resource-oriented open source Ruby framework for Web apps.
Home | Edit | New

Rack Handlers

Waves uses Rack, which offers a choice of Rack Handlers, interfaces to various web servers. A newly generated application uses Rack::Handler::Mongrel in all configurations, but this is easy to alter. Open configurations/development.rb in your text editor and delete or comment out this line:

handler ::Rack::Handler::Mongrel, :Host => host, :Port => port

Below that line are commented-out examples for WEBrick and Thin handlers. Uncomment the line for Thin to enable it. Next, you need to require Thin somewhere. If you only plan to use a handler in one configuration, you can add the require line to that file. Otherwise, you can add the require to the top of lib/application.rb

require 'thin'

When you run waves-server, the banner message should let you know that you’re running on Thin:

  I, [2008-08-19 11:54:23 #27519]  INFO -- : ** Waves Server v0.7.7 starting  on 127.0.0.1:3000
  >> Thin web server (v0.8.1 codename Rebel Porpoise)
  >> Threaded mode OFF
  >> Maximum connections set to 1024
  >> Listening on 127.0.0.1:3000, CTRL+C to stop
Last edited by automatthew, Tue Aug 19 09:56:16 -0700 2008
Home | Edit | New
Versions: