Sha256: d43a66708a82a469ef73cd466867cbf8a786d228e28ec7520112f91d9974e1dc
Contents?: true
Size: 715 Bytes
Versions: 2
Compression:
Stored size: 715 Bytes
Contents
require "rack" module Nutcracker module Web def self.start(nutcracker, o = {}) @thread = Thread.new do Thread.current.abort_on_exception=true app = Rack::URLMap.new(o.fetch(:context,"/") => App.new(nutcracker, o.fetch(:external_servers,[]))) Rack::Server.start( { :app => app, :environment => 'production', :pid => nil, :Port => 9292, :Host => '0.0.0.0', :AccessLog => [] }.merge(o) ) end self end def self.join @thread.join end def self.stop @thread.kill end autoload :App, 'nutcracker/web/app' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nutcracker-web-0.0.15 | lib/nutcracker/web.rb |
nutcracker-web-0.0.14 | lib/nutcracker/web.rb |