From eb8db26aee72d98da524508c5732f79361586608 Mon Sep 17 00:00:00 2001 From: Antoine du HAMEL Date: Sun, 3 May 2020 12:34:03 +0200 Subject: [PATCH] tools: add docserve target Spaws a webserver serving the docs. Helpful to circumvent the OS permission limitations or to access the docs form a different device on the local network. PR-URL: https://github.com/nodejs/node/pull/33221 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 498c9dcb5d1dd7..ca400962a9d8ba 100644 --- a/Makefile +++ b/Makefile @@ -772,6 +772,11 @@ out/doc/api/all.json: $(apidocs_json) tools/doc/alljson.js docopen: $(apidocs_html) @$(PYTHON) -mwebbrowser file://$(PWD)/out/doc/api/all.html +.PHONY: docserve +docserve: $(apidocs_html) + @$(PYTHON) -mwebbrowser http://localhost:8000/all.html + @$(PYTHON) -m http.server -d $(PWD)/out/doc/api + .PHONY: docclean docclean: $(RM) -r out/doc