[Mongrel] starting/stopping/registering Mongrel for HttpHandler

Geoffrey Bays charioteer7 at gmail.com
Thu Nov 8 22:05:31 EST 2007

I am currently learning Ruby and writing an app that simply uses
Mongrel's HttpHandler class to create simple ruby servlets. At the end
I have been using code similar to the example in simpletest.rb:

 h = Mongrel::HttpServer.new("", "3000")
 h.register("/test", SimpleHandler.new)
 #h.register("/files", Mongrel::DirHandler.new("."))

My question:
 Can I accomplish the equivalent to the lines above using
mongrel_rails with the correct params, or will that only work for a
Rails app? I know I can start mongrel with host and port, but how to
do the equivalent of ' h.register("/test", SimpleHandler.new)'  with

Many Thanks for an example.

geoffrey bays

More information about the Mongrel-users mailing list