This commit is contained in:
parent
a5e132dc1b
commit
82741036cb
1 changed files with 4 additions and 2 deletions
|
|
@ -20,6 +20,9 @@ let hello req _server _env =
|
|||
let* () = add ~field:"content-type" "text/plain" in
|
||||
respond `OK
|
||||
|
||||
(* TODO nice routes typing
|
||||
to enforce json verification
|
||||
to specify handlers responses data and status codes *)
|
||||
let routes =
|
||||
let open Vifu.Uri in
|
||||
let open Vifu.Route in
|
||||
|
|
@ -76,8 +79,7 @@ let () =
|
|||
let storage = Mkernel.block "storage" in
|
||||
let service =
|
||||
let ipv4 = Ipaddr.V4.Prefix.of_string_exn "10.0.0.2/24" in
|
||||
Mnet.stack ~name:"service"
|
||||
ipv4
|
||||
Mnet.stack ~name:"service" ipv4
|
||||
in
|
||||
Mkernel.(run [ rng; storage; service ])
|
||||
@@ fun rng storage (stack, tcp, udp) () ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue