Sha256: a032eeefc4376647dd8f345673ff6f38ab3184acf39b25f8bc4de55b600a0661
Contents?: true
Size: 679 Bytes
Versions: 1
Compression:
Stored size: 679 Bytes
Contents
module Terminus class Server def initialize(options = {}) @options = options end def running? not @server.nil? end def run! return if running? handler = Rack::Handler.get('thin') handler.run(app, :Port => @options[:port]) { |s| @server = s } end def stop! return unless running? @server.stop! @server = nil end private def app @app ||= Rack::Builder.new { use Terminus::Proxy use Faye::RackAdapter, :mount => FAYE_MOUNT, :timeout => 15 run Application.new }.to_app end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
terminus-0.3.0 | lib/terminus/server.rb |