Liking cljdoc? Tell your friends :D

Overview

Let’s take tour around the HellHound’s HTTP to see how it works on top of the HellHound’s .

Installation

<PLACEHOLDER TEXT>

Building blocks

The HTTP package of HellHound is made from several smaller parts which work together. Parts such as HTTP router, Websocket server, Event Dispatcher and so on.

In general sense the HellHound’s HTTP stack is just a barbone Ring compatible Pedestal webserver. The recommended way of using it is through hellhound.components.webserver/factory function with no parameter which creates a webserver with all the default values which in most cases you don’t need to chaing. By default HellHound will spin up a webserver which only serves assets, root enpoint and a websocket endpoint and the rest of the process happens on the client side application (Which handles by HellHound again), So most of the time when you need a new route in your application, you have to add it on the client side router. Ofcourse you can choose to not follow the same pattern but then you won’t get enough benefit of using HellHound.

HTTP package of HellHound has been composed by several pieces. In its heart it uses the Pedestal’s Interceptors to reply to HTTP requests. So almost all of the Pedestal concepts applies to HellHound HTTP as well.

Another key part of HellHound HTTP package is the HTTP router. There are plenty or Clojure routers around but in my opinion the best of is the Pdestal Router. It’s a data driven HTTP router with is simple, and predictable. We’ll discuss Pedestal router later in this chapter.

The most important part of HTTP package is the webserver component which lives in hellhound.components.webserver. Under the hood it uses Aleph that is an asynchronous network library on top Netty.

<PLACEHOLDER TEXT>

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close