mirror of
https://github.com/aantron/dream.git
synced 2025-12-31 00:03:52 -05: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-middlewarewraps the app with the logger. 3-counteris a really basic app that actually does something in response to requests.