#ListenOptionsR Source

type ListenOptionsR :: Row Typetype ListenOptionsR = (backlog :: Maybe Int, certFile :: Maybe String, closingHandler :: Maybe ClosingHandler, hostname :: Maybe String, keyFile :: Maybe String, notFoundHandler :: Maybe (Request Unit -> ResponseM), onStarted :: Maybe (Effect Unit), port :: Maybe Int)

#RoutingSettings Source

#RoutingSettingsR Source

type RoutingSettingsR :: Type -> Row Typetype RoutingSettingsR route = (route :: RouteDuplex' route, router :: Request route -> ResponseM)

#ServerM Source

type ServerM = Effect (Effect Unit -> Effect Unit)

The ServerM is just an Effect containing a callback to close the server. This type is the return type of the HTTPurple serve and related methods.

#serve Source

serve :: forall route from fromRL via missing missingList. RowToList missing missingList => FillableFields missingList () missing => Union via missing (ListenOptionsR) => RowToList from fromRL => JustifiableFields fromRL from () via => Record from -> RoutingSettings route -> ServerM

Given a ListenOptions and a RoutingSettings, creates and runs a HTTPurple server.