Class: Dugway::Cli::Server
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Dugway::Cli::Server
- Defined in:
- lib/dugway/cli/server.rb
Instance Method Summary collapse
Instance Method Details
#start ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/dugway/cli/server.rb', line 31 def start if [:suppress_warnings] $VERBOSE = nil end listener = Listen.to('.', only: /\.dugway\.json$/) do |modified| puts "Config changed, restarting server..." exec "dugway server" end Thread.new { listener.start } Rack::Server.start({ :config => File.join(Dir.pwd, 'config.ru'), :environment => 'none', :Host => [:host], :Port => [:port], :server => [:server] }) end |