Module: Mihari::Commands::Web
- Included in:
- Mihari::CLI
- Defined in:
- lib/mihari/commands/web.rb
Class Method Summary collapse
Class Method Details
.included(thor) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/mihari/commands/web.rb', line 6 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 = ["port"].to_i || 9292 host = ["host"] || "localhost" load_configuration Mihari::App.run!(port: port, host: host) end end end |