2021-03-08 22:23:30 +03:00
..
2021-03-08 21:58:15 +03:00
2021-03-08 21:58:15 +03:00
2021-03-08 21:58:15 +03:00
2021-03-08 21:58:15 +03:00
2021-03-08 22:23:30 +03:00
2021-03-08 21:58:15 +03:00

This project is so simple that it doesn't even log requests!

let () =
  Dream.run (fun _ ->
    Dream.respond "Good morning, world!")

It's the absolute minimum Dream server. It just tells you where to point your browser once the server has started:

$ make
08.02.21 21:17:21.471                       Running on http://localhost:8080
08.02.21 21:17:21.471                       Press ENTER to stop

If you go there, to http://localhost:8080, you will, of course, see Good morning, world!.


Where to go from here?

  • The next example, 2-middleware wraps the app with the logger.
  • 3-counter is a really basic app that actually does something in response to requests.