From 6dab63f36db7b589dd85e309a39d2e4cd226d484 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