summaryrefslogtreecommitdiff
path: root/sample/soap/calc/httpd.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/soap/calc/httpd.rb')
-rw-r--r--sample/soap/calc/httpd.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/sample/soap/calc/httpd.rb b/sample/soap/calc/httpd.rb
new file mode 100644
index 0000000000..ee8ab09f50
--- /dev/null
+++ b/sample/soap/calc/httpd.rb
@@ -0,0 +1,15 @@
+#!/usr/bin/env ruby
+
+require 'webrick'
+require 'getopts'
+
+getopts "", 'r:', 'p:8808'
+
+s = WEBrick::HTTPServer.new(
+ :BindAddress => "0.0.0.0",
+ :Port => $OPT_p.to_i,
+ :DocumentRoot => $OPT_r || ".",
+ :CGIPathEnv => ENV['PATH']
+)
+trap(:INT){ s.shutdown }
+s.start