class Radbas::ApplicationServer

Overview

Serves an application with HTTP::Server and closes it gracefully on interrupt or termination.

Defined in:

radbas-framework/application_server.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(application : HTTP::Handler, logger : ::Log = Log) #

[View source]

Instance Method Detail

def bind(host : String, port : Int32, reuse_port = false) : self #

[View source]
def bind(uri : String) : self #

[View source]
def close : Nil #

[View source]
def listen : Nil #

Starts serving, binding 0.0.0.0:8080 if nothing was bound. Blocks until #close is called.


[View source]