From 9a8457bb431c75eb20a78f68654b52a681b0f3dc Mon Sep 17 00:00:00 2001 From: Giorgio Garofalo Date: Sun, 1 Dec 2024 23:12:16 +0100 Subject: [PATCH] Add server/README.md --- server/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 server/README.md diff --git a/server/README.md b/server/README.md new file mode 100644 index 00000000..e6e3d9e8 --- /dev/null +++ b/server/README.md @@ -0,0 +1,12 @@ +# server + +This module contains code for Quarkdown's local webserver, +which enables automatic browser reload according to this flow: + +1. The server starts; +2. When the address is opened in the browser, +the injected [`websockets.js`](../core/src/main/resources/render/script/websockets.js) script +begins listening to `/reload` for messages. +3. The [CLI](../cli), upon generating output files, sends a message via websockets to `/reload`; +4. The server forwards this message to the listening clients (browsers); +5. Each client reloads its content as soon as it receives the message. \ No newline at end of file