Module: Webtail::App

Extended by:
App
Included in:
App
Defined in:
lib/webtail/app.rb

Defined Under Namespace

Classes: Server

Instance Method Summary collapse

Instance Method Details

#open_browserObject



15
16
17
# File 'lib/webtail/app.rb', line 15

def open_browser
  ::Launchy.open("http://localhost:#{Webtail.config[:port]}") rescue nil
end

#runObject



5
6
7
8
9
10
11
12
13
# File 'lib/webtail/app.rb', line 5

def run
  ::Rack::Handler::WEBrick.run(
    Server.new,
    :Port          => Webtail.config[:port],
    :Logger        => ::WEBrick::Log.new("/dev/null"),
    :AccessLog     => [nil, nil],
    :StartCallback => proc { App.open_browser }
  )
end