Module: Async::Debug
- Defined in:
- lib/async/debug.rb,
lib/async/debug/version.rb,
lib/async/debug/application.rb,
lib/async/debug/reactor_view.rb
Defined Under Namespace
Classes: Application, ReactorView
Constant Summary collapse
- VERSION =
"0.3.0"
Class Method Summary collapse
-
.serve(endpoint: nil) ⇒ Object
Start the debugger.
Class Method Details
.serve(endpoint: nil) ⇒ Object
Start the debugger.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/async/debug.rb', line 18 def self.serve(endpoint: nil) endpoint ||= Async::HTTP::Endpoint.parse("http://localhost:9090") middleware = ::Protocol::HTTP::Middleware.build do |builder| builder.use Lively::Assets, root: File.("../../public", __dir__) builder.use Lively::Assets builder.use Debug::Application end Async(transient: true, annotation: self) do Console.logger.info(self, "Live debugger binding to #{endpoint}...") Async::HTTP::Server.new(middleware, endpoint).run end end |