# Starting/stopping/registering Mongrel for HttpHandler

**URL:** <https://www.ruby-forum.com/t/starting-stopping-registering-mongrel-for-httphandler/119677>\
**Category:** Mongrel\
**Created:** [November 9, 2007, 4:05am UTC](https://www.ruby-forum.com/t/starting-stopping-registering-mongrel-for-httphandler/119677 "2007-11-09T04:05:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geoffrey\_Bays](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8797f3/32.png) [@Geoffrey\_Bays](https://www.ruby-forum.com/u/Geoffrey_Bays)\
**Post date:** [November 9, 2007, 4:05am UTC](https://www.ruby-forum.com/t/starting-stopping-registering-mongrel-for-httphandler/119677/1 "2007-11-09T04:05:49Z")

</div>

Hi.  
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(“0.0.0.0”, “3000”)  
h.register("/test", SimpleHandler.new)  
#h.register("/files", Mongrel::DirHandler.new("."))  
h.run.join

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  
mongrel\_rails?

Many Thanks for an example.

geoffrey bays
