mirror of
https://github.com/aantron/dream.git
synced 2025-12-15 00:05:29 -05:00
13 lines
274 B
OCaml
13 lines
274 B
OCaml
let loader _root path _request =
|
|
match Assets.read path with
|
|
| None -> Dream.empty `Not_Found
|
|
| Some asset -> Dream.respond asset
|
|
|
|
let () =
|
|
Dream.run
|
|
@@ Dream.logger
|
|
@@ Dream.router [
|
|
Dream.get "/assets/**" (Dream.static ~loader "")
|
|
]
|
|
@@ Dream.not_found
|