Class: Hatetepe::CLI
- Inherits:
-
Thor
- Object
- Thor
- Hatetepe::CLI
- Defined in:
- lib/hatetepe/cli.rb
Instance Method Summary collapse
Instance Method Details
#start ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/hatetepe/cli.rb', line 27 def start require "hatetepe/server" require "rack" config = config_for() ENV["RACK_ENV"] = config[:env] $stderr << "We're in #{config[:env]}\n" $stderr << "Booting from #{config[:rackup]}\n" EM.epoll EM.synchrony do $stderr << "Binding to #{config[:host]}:#{config[:port]}\n" trap("INT") { EM.stop } trap("TERM") { EM.stop } Server.start(config) end end |