package dream-serve

  1. Overview
  2. Docs
Static HTML website server with live reload

Install

Dune Dependency

Authors

Maintainers

Sources

1.0.1.tar.gz
sha256=3a7f22d1b84302ff10e2862eee89d00f59278b65742c1168fb5cfab87c982ebb
md5=35c356143b82907a8e2afefe51cb29f1

README.md.html

dream-serve

dream-serve is a very simple server for static sites. It reloads your browser when the site changes.



It's good for developing docs, streamlining coverage reports, and so forth. It works by injecting a script into HTML, which opens a WebSocket back to the server. The server uses the WebSocket to tell the browser when to reload.


Usage

opam install dream-serve
dream-serve ./my/site

To choose a port number,

dream-serve ./my/site -p 9090

Based on

dream-serve is implemented as one small OCaml file. It is based on Web framework Dream, libuv binding Luv, and HTML rewriter Lambda Soup.

Special thanks to Ulrik Strid for writing the integration between Lwt and Luv/libuv that makes it possible to easily run Dream over libuv.

OCaml

Innovation. Community. Security.