Class: Requestkit::Server
- Inherits:
-
Object
- Object
- Requestkit::Server
- Defined in:
- lib/requestkit/server.rb,
lib/requestkit/server/render.rb,
lib/requestkit/server/request.rb
Defined Under Namespace
Instance Method Summary collapse
-
#initialize(config) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
Instance Method Details
#start ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/requestkit/server.rb', line 22 def start puts "📦 Requestkit starting on http://localhost:#{@port}" puts "Press Ctrl+C to stop" endpoint = Async::HTTP::Endpoint.parse("http://localhost:#{@port}") Async do Async::HTTP::Server.new(method(:route), endpoint).run end end |