OSDN Git Service

Replaced mongrel with thin
[redminele/redminele.git] / ruby / lib / ruby / gems / 1.8 / gems / thin-1.2.11-x86-mswin32 / example / config.ru
1 # Run with: rackup -s thin
2 # then browse to http://localhost:9292
3 # Or with: thin start -R config.ru
4 # then browse to http://localhost:3000
5
6 # Check Rack::Builder doc for more details on this file format:
7 #  http://rack.rubyforge.org/doc/classes/Rack/Builder.html
8 require 'thin'
9
10 app = proc do |env|
11   # Response body has to respond to each and yield strings
12   # See Rack specs for more info: http://rack.rubyforge.org/doc/files/SPEC.html
13   body = ['hi!']
14   
15   [
16     200,                                        # Status code
17     { 'Content-Type' => 'text/html' },          # Reponse headers
18     body                                        # Body of the response
19   ]
20 end
21
22 run app