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
7 exec('unicorn', $0) if $0 == __FILE__
9 # Rack-compatible "Hello World" application
11 MSG
= "Hello world!\n"
15 { "Content-Type" => "text/plain",
16 "Content-Length" => MSG
.size
},
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
,