hellhound.components.webserver
The default web/websocket server component of HellHound.
This component provides a webserver based on aleph. In order this use this component simply call the factory
function. It’s going to get the configuration from the environment edn file and returns a component map.
default-factory
(default-factory)
(default-factory hooks)
Returns a new webserver component which uses the default routes and configuration of HellHound.
TODO: more docs
default-hooks
factory
(factory routes)
(factory routes hooks)
(factory routes hooks config)
Returns a new webserver component by the given routes
and an optional config
map.
The routes
argument should be a valid HellHound route collection, compatible with bidi library. Hellhound provides a helper namespace for dealing with routes. Checkout hellhound.http and hellhound.http.route namespaces for more info.
start!
(start! routes hooks config)
Returns a start function for the webserver component.
The return function starts the webserver using the given routes
and config
map.
NOTE: This function RETURNS a start function.
stop!
(stop! this)
Stops the running webserver server.