Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/trunk/sample/basic/calc/httpd.rb

Revision 1843, 376 bytes (checked in by nahi, 2 years ago)
  • reorganize sampless
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 #!/usr/bin/env ruby
2
3 require 'webrick'
4 require 'soap/property'
5
6 docroot = "."
7 port = 8808
8 if opt = SOAP::Property.loadproperty("samplehttpd.conf")
9   docroot = opt["docroot"]
10   port = Integer(opt["port"])
11 end
12
13 s = WEBrick::HTTPServer.new(
14   :BindAddress => "0.0.0.0",
15   :Port => port,
16   :DocumentRoot => docroot,
17   :CGIPathEnv => ENV['PATH']
18 )
19 trap(:INT){ s.shutdown }
20 s.start
Note: See TracBrowser for help on using the browser.