about summary refs log tree commit homepage
path: root/examples/reverse_proxy.ru
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-02-01 15:05:52 -0800
committerEric Wong <normalperson@yhbt.net>2011-02-01 18:51:04 -0800
commit130d086666ccd825fcb13cf02fcf941b8fe661af (patch)
treea123aab9b8396d8f74ee72983cf92e125451ac8b /examples/reverse_proxy.ru
parent9bf406655a84090426a62ab60677df529e408f17 (diff)
downloadrainbows-130d086666ccd825fcb13cf02fcf941b8fe661af.tar.gz
This can be a starting point for developing Cool.io or
EventMachine-based reverse proxy applications on Rainbows!

Eventually Rainbows! could replace nginx for Unicorn users!
Just don't consider this code production ready, yet, at all,
it doesn't handle any sort of failover and has no automated
tests, yet.
Diffstat (limited to 'examples/reverse_proxy.ru')
-rw-r--r--examples/reverse_proxy.ru9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/reverse_proxy.ru b/examples/reverse_proxy.ru
new file mode 100644
index 0000000..fcb9e74
--- /dev/null
+++ b/examples/reverse_proxy.ru
@@ -0,0 +1,9 @@
+# see Rainbows::ReverseProxy RDoc
+cfg = {
+  :upstreams => [
+    "/tmp/.r.sock",
+    "http://bogomips.org/",
+    [ "http://10.6.6.6:666/", { :weight => 666 } ],
+  ]
+}
+run Rainbows::ReverseProxy.new(cfg)