about summary refs log tree commit homepage
path: root/bin/yahns-rackup
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-30 23:52:38 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-31 05:08:19 +0000
commit885b2f28f3b31539140a8466e6205903bc7cf1d2 (patch)
treed47c0b5cf4e8b0f29c883945d68fca674e089c7f /bin/yahns-rackup
parent2710180a00635dbdf7faebc339016a045b21c863 (diff)
downloadyahns-885b2f28f3b31539140a8466e6205903bc7cf1d2.tar.gz
This should make it easier for Rack users to get started with yahns.
Diffstat (limited to 'bin/yahns-rackup')
-rwxr-xr-xbin/yahns-rackup9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/yahns-rackup b/bin/yahns-rackup
new file mode 100755
index 0000000..baf110b
--- /dev/null
+++ b/bin/yahns-rackup
@@ -0,0 +1,9 @@
+#!/this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby
+# -*- encoding: binary -*-
+# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
+# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+require 'yahns/rackup_handler'
+ARGV.grep(/\A(?:-s|--server)/)[0] and abort "--server has no effect for #$0"
+ARGV[0, 0] = %w(-s yahns)
+Rack::Handler.register('yahns', 'Yahns::RackupHandler')
+Rack::Server.start