Skip to content

Instantly share code, notes, and snippets.

@bluddy
Created December 15, 2016 15:42
Show Gist options
  • Save bluddy/c6642a7aef425b34fc1d0bba8f61f068 to your computer and use it in GitHub Desktop.
Save bluddy/c6642a7aef425b34fc1d0bba8f61f068 to your computer and use it in GitHub Desktop.
trying example eliom site
[%%shared
open Eliom_lib
open Eliom_content
open Html.D
]
module Mysite_app =
Eliom_registration.App (
struct
let application_name = "mysite"
let global_data_path = None
end)
let f _ () =
Lwt.return "<html><head><title>Hello world</title></head><body>Welcome</body></html>"
let main_service =
Eliom_registration.Html_text.create
~path:(Eliom_service.Path ["aaa"; "bbb"])
~meth:(Eliom_service.Get Eliom_parameter.any)
f
let () =
Mysite_app.register
~service:main_service
(fun _ () ->
Lwt.return
(Eliom_tools.F.html
~title:"mysite"
~css:[["css";"mysite.css"]]
Html.F.(body [
h1 [pcdata "Welcome from Eliom's distillery!"];
])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment