dreamversion Documentation on ocaml.org
Tidy, feature-complete Web framework
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.
| Tags | http web framework websocket graphql server http2 tls |
|---|---|
| Author | Anton Bachin <antonbachin@yahoo.com> |
| License | MIT |
| Homepage | https://github.com/aantron/dream |
| Issue Tracker | https://github.com/aantron/dream/issues |
| Documentation | https://aantron.github.io/dream |
| Maintainer | Anton Bachin <antonbachin@yahoo.com> |
| Dependencies |
|
| Source [http] | https://github.com/aantron/dream/releases/download/1.0.0-alpha3/dream-1.0.0-alpha3.tar.gz sha256=f289253109aee39ab912f9f38aa5e7b44e0b4b01fd7d3dd5c407b034c57f01bc md5=148588e6f584cd9f2438e56da7df2f56 |
- dream-accept
- dream-cli>=0.2.0
- dream-encoding>=0.2.0
- dream-html<3.9.5
- dream-livereload>=0.2.0
- dream-serve>=1.0.1
- FPauth
- FPauth-core
- FPauth-responses
- FPauth-strategies
- graphql_jsoo_client
- hyperwith-test
- lambdapi>=2.4.0
- ppx_dream_eml
- universal-portal
- webauthndev & <0.2.0


