add hot_config_file config parameter
[unicorn.git] / bin / unicorn-hello-world
blob8d77ea1296ce991e525bf4aaaef9d3309b767ec0
1 #!/usr/bin/env ruby
2 # Simple "Hello World" application for Unicorn
4 # Exec ourselves with unicorn. A shebang (e.g. "#!/usr/bin/unicorn")
5 # won't work since unicorn itself is a Ruby script with a shebang, but
6 # this does:
7 exec('unicorn', $0) if $0 == __FILE__
9 # Rack-compatible "Hello World" application
10 class HelloWorld
11 MSG = "Hello world!\n"
13 def call(env)
14 [ 200,
15 { "Content-Type" => "text/plain",
16 "Content-Length" => MSG.size},
17 [ MSG ]
19 end
20 end
22 # make sure this hash is the last statement, as this is eval-ed by unicorn
24 # :listeners => %w(0.0.0.0:8080 127.0.0.1:7701 /tmp/test.sock),
25 # :hot_config_file => "/tmp/hot_config",
26 :app => HelloWorld.new,