2021-03-24 17:46:21 +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-24 17:46:21 +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 prints a message to the log at startup, telling you where to point your browser:

$ 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 to http://localhost:8080, you will, of course, see Good morning, world!.


Next steps:

  • 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.