Sha256: d3336436e55cc458cc68153f4446412f248d0d182907bba9cda8350e82408439

Contents?: true

Size: 485 Bytes

Versions: 1

Compression:

Stored size: 485 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 => '0.0.0.0', :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

1 entries across 1 versions & 1 rubygems

Version Path
firehose-0.0.7 lib/firehose/cli.rb