2020-12-02 13:33:15 +00:00
|
|
|
open Opium
|
|
|
|
|
|
|
|
|
2021-01-21 16:51:58 +00:00
|
|
|
let app t =
|
2020-12-02 13:33:15 +00:00
|
|
|
App.empty
|
|
|
|
|> App.cmd_name "Builder Web"
|
|
|
|
|> Builder_web.add_routes t
|
|
|
|
|
|
|
|
let () =
|
2021-01-21 16:51:58 +00:00
|
|
|
let () = Mirage_crypto_rng_unix.initialize () in
|
|
|
|
let datadir = Fpath.v "/var/db/builder-web/" in
|
2021-01-22 09:59:03 +00:00
|
|
|
let t = Result.get_ok (Builder_web.init "/var/db/builder-web/builder.sqlite3" datadir) in
|
2021-01-21 16:51:58 +00:00
|
|
|
App.run_command (app t)
|