Sha256: 46c2183c48881d6a2c1d5c60166f2df823d5ad1eeedbf56992f9cb5b24ba5633

Contents?: true

Size: 487 Bytes

Versions: 2

Compression:

Stored size: 487 Bytes

Contents

require 'thor'

module Firehose
  class CLI < Thor
    desc "start", "starts the firehose server"
    method_option :port, :type => :numeric, :default => 7474, :required => true, :aliases => '-p'
    method_option :host, :type => :string, :default => '127.0.0.1', :required => true, :aliases => '-h'
    def start
      require 'thin'

      server = Thin::Server.new(options[:host], options[:port]) do
        run Firehose::Rack::App.new
      end

      server.start!
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
firehose-0.0.6 lib/firehose/cli.rb
firehose-0.0.5 lib/firehose/cli.rb