Sha256: 9426a27d2bc7601e6a8bf53ca35900a5f921ed8588609c088cb57bac319f7de6
Contents?: true
Size: 502 Bytes
Versions: 20
Compression:
Stored size: 502 Bytes
Contents
require 'webrick' module Awestruct module Commands WEBrick::HTTPUtils::DefaultMimeTypes.store('atom', 'application/atom+xml') class Server attr_reader :server def initialize(path, bind_addr='0.0.0.0', port=4242) @path = path @bind_addr = bind_addr @port = port end def run @server = WEBrick::HTTPServer.new( :DocumentRoot=>@path, :Port=>@port, :BindAddress=>@bind_addr ) @server.start end end end end
Version data entries
20 entries across 20 versions & 1 rubygems