Sha256: 64181e224bf4b3e7029a1f76d4d4f3781f3e1953edabbdedbdc39dea4920dcb6

Contents?: true

Size: 377 Bytes

Versions: 19

Compression:

Stored size: 377 Bytes

Contents

module SmallCage::Commands
  class Server
    def self.execute(opts)
      document_root = opts[:path]
      port = opts[:port]
      
      server = SmallCage::HTTPServer.new(document_root, port)
      
      sighandler = Proc.new {|signal| server.shutdown}
      SmallCage::Application.add_signal_handler(["INT", "TERM"], sighandler)

      server.start    
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
bluemark-smallcage-0.1.3 lib/smallcage/commands/server.rb
bluemark-smallcage-0.1.4 lib/smallcage/commands/server.rb
bluemark-smallcage-0.1.5 lib/smallcage/commands/server.rb
smallcage-0.2.4 lib/smallcage/commands/server.rb
smallcage-0.2.3 lib/smallcage/commands/server.rb
smallcage-0.2.2 lib/smallcage/commands/server.rb
smallcage-0.2.1 lib/smallcage/commands/server.rb
smallcage-0.2.0 lib/smallcage/commands/server.rb
smallcage-0.1.9 lib/smallcage/commands/server.rb
smallcage-0.1.8 lib/smallcage/commands/server.rb
smallcage-0.1.7 lib/smallcage/commands/server.rb
smallcage-0.1.6 lib/smallcage/commands/server.rb
smallcage-0.1.5 lib/smallcage/commands/server.rb
smallcage-0.1.4 lib/smallcage/commands/server.rb
smallcage-0.1.0 lib/smallcage/commands/server.rb
smallcage-0.0.9 lib/smallcage/commands/server.rb
smallcage-0.1.1 lib/smallcage/commands/server.rb
smallcage-0.1.3 lib/smallcage/commands/server.rb
smallcage-0.1.2 lib/smallcage/commands/server.rb