package dream
Install
Authors
Maintainers
Sources
md5=b8ad7f3e30f3e88e5451d92e42b49ce4
Description
Dream is a feature-complete Web framework with a simple programming model and no boilerplate. It provides only two data types, request and response.
Almost everything else is either a built-in OCaml type, or an abbreviation for a bare function. For example, a Web app, known in Dream as a handler, is just an ordinary function from requests to responses. And a middleware is then just a function from handlers to handlers.
Within this model, Dream adds:
- Session management with pluggable back ends.
- A fully composable router.
- Support for HTTP/1.1, HTTP/2, and HTTPS.
- WebSockets.
- GraphQL, including subscriptions and a built-in GraphiQL editor.
- SQL connection pool helpers.
- Server-side HTML templates.
- Automatic secure handling of cookies and forms.
- Unified, internationalization-friendly error handling.
- A neat log, and OCaml runtime configuration.
- Helpers for Web formats, such as Base64url, and a modern cipher.
Because of the simple programming model, everything is optional and composable. It is trivailly possible to strip Dream down to just a bare driver of the various HTTP protocols.
Dream is presented as a single module, whose API is documented on one page. In addition, Dream comes with a large number of examples. Security topics are introduced throughout, wherever they are applicable.
Dependencies (32)
- result
- psq
- faraday-lwt-unix
-
faraday
>= "0.6.1"
-
digestif
>= "0.7.2"
-
bigstringaf
>= "0.5.0"
-
angstrom
>= "0.14.0"
- yojson
-
uri
>= "4.0.0"
-
opam-installer
build
-
ocaml
>= "4.08.0" & < "5.0"
-
multipart-form-data
>= "0.3.0" & < "0.4.0"
-
mirage-crypto-rng
>= "0.8.0" & < "0.11.0"
-
mirage-crypto
>= "0.8.1"
- magic-mime
-
logs
>= "0.5.0"
-
ssl
>= "0.5.8"
- lwt_ssl
-
lwt_ppx
>= "1.2.2"
- lwt
- hmap
- graphql-lwt
- graphql_parser
-
fmt
>= "0.8.7"
-
dune
>= "2.7.0"
- cstruct
- conf-libev
-
caqti
>= "1.4.0" & < "2.0.0~"
- caqti-lwt
- bigarray-compat
-
base64
>= "3.1.0"
- base-unix
Dev Dependencies (3)
-
ppx_expect
with-test
-
bisect_ppx
dev & >= "2.5.0"
-
alcotest
with-test
Used by (5)
-
dream-cli
< "0.2.0"
-
dream-encoding
< "0.2.0"
-
dream-livereload
< "0.2.0"
- hyper
- u2f
Conflicts (5)
-
tls
>= "0.15.0"
- websocketaf
- h2
- httpaf
- gluten