2021-04-04 14:44:43 +03:00
..
2021-03-25 11:58:09 +03:00
2021-03-25 11:58:09 +03:00
2021-03-25 11:58:09 +03:00
2021-03-25 11:58:09 +03:00
2021-03-26 01:20:37 +03:00
2021-03-26 21:53:09 +03:00
2021-03-26 21:41:35 +03:00
2021-03-26 21:41:35 +03:00
2021-03-26 22:38:40 +03:00
2021-03-26 23:25:22 +03:00
2021-03-30 16:26:11 +03:00
2021-04-01 11:53:13 +03:00
2021-04-01 11:53:13 +03:00
2021-03-25 01:59:19 +03:00
2021-03-29 21:28:33 +03:00
2021-03-24 20:34:40 +03:00
2021-03-31 16:57:33 +03:00
2021-03-29 00:00:50 +03:00
2021-03-29 21:28:33 +03:00
2021-03-29 20:20:25 +03:00
2021-03-29 21:28:33 +03:00
2021-03-24 20:34:40 +03:00
2021-03-29 21:28:33 +03:00

Tutorial

Dream's first several examples make up a tutorial. Each example is a complete project with a helpful README, and plenty of links to next steps and documentation. You can begin at 1-hello, or look in the list below and jump to whatever interests you!

  • 1-hello  —  the simplest Dream server responds to every request with the same friendly message.
  • 2-middleware  —  adds the first Dream middleware: the logger.
  • 3-router  —  different handlers for different paths.
  • 4-counter  —  the first custom middleware!
  • 5-echo  —  reads request bodies.
  • 6-template  —  renders responses from inline HTML templates and guards against XSS.
  • 7-debug  —  includes detailed information about errors in responses.
  • 8-error  —  customize all error responses in one place.
  • 9-log  —  writing messages to Dream's log.
  • a-promise  —  introduces Lwt, the promise library used by Dream.
  • b-session  —  associates state with client sessions.
  • c-cookie  —  sets custom cookies.
  • d-form  —  reading forms and CSRF prevention.
  • e-json
  • f-static
  • g-upload
  • h-sql  —  finally CRUD!
  • i-graphql
  • j-stream
  • k-websocket
  • k-https

That's it for the tutorial!


Reason

There are several examples showing Dream with Reason syntax.


Extras

The rest of the examples cover additional topics in a more-standalone fashion. The goal of the examples is to cover the great majority of real-world HTTP usage, so that they make up a good survey. Please open an issue if something is missing!


Ideas:

Basics:

Security:

Techniques:

Advanced customization: