How to make a "hello world" in Ocsigen?
Here it is! The famous "Hello World" for a client/server Eliom application:
open Eliom_content open Html5.D open Eliom_parameter module Example = Eliom_registration.App (struct let application_name = "example" end) let main = Eliom_service.Http.service ~path: ~get_params:unit () let _ = Example.register ~service:main (fun () () -> Lwt.return (html (head (title (pcdata "Hello World of Ocsigen")) ) (body [h1 [pcdata "Hello World!"]; p [pcdata "Welcome to my first Ocsigen website."]])))
Download full code
Warning: This third party code may be outdated. Please notify the author is something is broken, or do a pull request on github.