about summary refs log tree commit homepage
path: root/examples/sinatra/unicorn-sinatra-example
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-02-11 11:42:29 -0800
committerEric Wong <normalperson@yhbt.net>2009-02-11 11:42:29 -0800
commita78fdd5361f8e4e27eae893aedb21a0256c12a88 (patch)
treeda9a19b7ea9631fde5f64aa71ea932cb802af5ca /examples/sinatra/unicorn-sinatra-example
parent5f784047b15ef6d070af8fd2d41404dd08e85aa8 (diff)
downloadunicorn-a78fdd5361f8e4e27eae893aedb21a0256c12a88.tar.gz
Diffstat (limited to 'examples/sinatra/unicorn-sinatra-example')
-rwxr-xr-xexamples/sinatra/unicorn-sinatra-example13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/sinatra/unicorn-sinatra-example b/examples/sinatra/unicorn-sinatra-example
new file mode 100755
index 0000000..3472d56
--- /dev/null
+++ b/examples/sinatra/unicorn-sinatra-example
@@ -0,0 +1,13 @@
+#!/home/ew/bin/ruby
+# putting unicorn in the shebang won't work because unicorn itself is
+# a ruby script, so the following is the next best thing:
+exec('unicorn', $0) if $0 == __FILE__
+
+# the below script is a standalone Sinatra application; absolutely
+# nothing special needs to be done in this Sinatra app for running
+# with Unicorn
+require 'sinatra_example'
+
+# the following hash needs to be the last statement, as unicorn
+# will eval this entire file
+{ :app => Sinatra::Application }