Sha256: 7237e0ba421957b5145c8ee8d6407f99719a72fa034152b236eff610912d6978

Contents?: true

Size: 561 Bytes

Versions: 9

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Commands
    module Web
      def self.included(thor)
        thor.class_eval do
          desc "web", "Launch the web app"
          method_option :port, type: :numeric, default: 9292
          method_option :host, type: :string, default: "localhost"
          def web
            port = options["port"].to_i || 9292
            host = options["host"] || "localhost"

            load_configuration
            Mihari::App.run!(port: port, host: host)
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mihari-3.2.0 lib/mihari/commands/web.rb
mihari-3.1.0 lib/mihari/commands/web.rb
mihari-3.0.1 lib/mihari/commands/web.rb
mihari-3.0.0 lib/mihari/commands/web.rb
mihari-2.4.0 lib/mihari/commands/web.rb
mihari-2.3.1 lib/mihari/commands/web.rb
mihari-2.3.0 lib/mihari/commands/web.rb
mihari-2.2.1 lib/mihari/commands/web.rb
mihari-2.2.0 lib/mihari/commands/web.rb