title: Serving files & handling requests with Webrick on same port
body: <p>Hi I have a need to be able to receive requests from GitLab (body => JSON) as well as serve files on same port. I am trying to use Webrick for this purpose. I can do these separately.</p>
  
  <p>To serve files I do:</p>
  
  <pre><code>server = WEBrick::HTTPServer.new(:Port =&gt; 3030, :DocumentRoot =&gt; '/')
  server.start
  </code></pre>
  
  <p>To receive and process jSON I do:</p>
  
  <pre><code>server = WEBrick::HTTPServer.new(:Port =&gt; 3030, :DocumentRoot =&gt; '/')
  server.mount_proc '/' do | req, res |
      Queue.new(req.body)
  end
  </code></pre>
  
  <p>But I need this functionality combined, is there a way to do this with Webrick?</p>