Skip to content

Commit

Permalink
Attempting to reproduce #347 locally
Browse files Browse the repository at this point in the history
  • Loading branch information
aantron committed Oct 10, 2024
1 parent d088771 commit 8dddedf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dream.opam
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ depends: [
"camlp-streams"
"caqti" {>= "2.0.0"}
"caqti-lwt" {>= "2.0.0"}
("conf-libev" {os != "win32"} | "ocaml" {os = "win32"})
# ("conf-libev" {os != "win32"} | "ocaml" {os = "win32"})
"cstruct" {>= "6.0.0"}
"digestif" {>= "0.7"} # to_raw_string.
"dream-httpaf" {>= "1.0.0~alpha3"}
Expand Down
6 changes: 6 additions & 0 deletions example/1-hello/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.PHONY : test
test :
killall hello.exe || true
dune exec -- ./hello.exe &
sleep 1;
bash -c "for (( i=0; i<2048; ++i )) ; do curl -s http://localhost:8080/ ; done"
13 changes: 11 additions & 2 deletions example/1-hello/hello.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
let () =
Dream.run (fun _ ->
Dream.html "Good morning, world!")
Lwt_engine.set (new Lwt_engine.select);

Dream.router
[
Dream.get "/" (fun _ ->
Lwt.return
(Dream.response
~headers:[ ("Content-Type", "text/plain") ]
"On macOS I leak.\n"));
]
|> Dream.logger |> Dream.run ~port:8080

0 comments on commit 8dddedf

Please sign in to comment.