From ceceb04691a054b0638058fc31c3552f3c686a33 Mon Sep 17 00:00:00 2001 From: Yawar Amin Date: Wed, 24 Apr 2024 00:40:26 -0400 Subject: [PATCH] docs --- dream-html/Dream_html/Livereload/index.html | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/dream-html/Dream_html/Livereload/index.html b/dream-html/Dream_html/Livereload/index.html index 9a1e1a1..61d4390 100644 --- a/dream-html/Dream_html/Livereload/index.html +++ b/dream-html/Dream_html/Livereload/index.html @@ -4,14 +4,7 @@ @@ Dream.router [ Dream_html.Livereload.route; (* ...other routes... *) -]
val head : std_tag

(2) Use this instead of the default HTML.head:

html [
-  Livereload.head [] [
-    title [] "Dream-html livereload example";
-  ];
-  body [] [
-    (* ... *)
-  ];
-]

(3) And run the server with environment variable ENV=dev. ⚠️ If this env var is not set, then livereload is turned off.

val script : node

If you are using your own custom head implementation and just need the live reload script, use:

custom_head [] [
+]
val script : node

(2) Put this inside your head:

head [] [
   Livereload.script;
   (* ... *)
-]
+]

(3) And run the server with environment variable ENV=dev.

⚠️ If this env var is not set, then livereload is turned off. This means that the route will respond with 404 status and the script will be omitted from the rendered HTML.