From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../tests/tools/wptserve/docs/server.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 testing/web-platform/tests/tools/wptserve/docs/server.rst (limited to 'testing/web-platform/tests/tools/wptserve/docs/server.rst') diff --git a/testing/web-platform/tests/tools/wptserve/docs/server.rst b/testing/web-platform/tests/tools/wptserve/docs/server.rst new file mode 100644 index 0000000000..5688a0a3bc --- /dev/null +++ b/testing/web-platform/tests/tools/wptserve/docs/server.rst @@ -0,0 +1,20 @@ +Server +====== + +Basic server classes and router. + +The following example creates a server that serves static files from +the `files` subdirectory of the current directory and causes it to +run on port 8080 until it is killed:: + + from wptserve import server, handlers + + httpd = server.WebTestHttpd(port=8080, doc_root="./files/", + routes=[("GET", "*", handlers.file_handler)]) + httpd.start(block=True) + +:mod:`Interface ` +---------------------------------- + +.. automodule:: wptserve.server + :members: -- cgit v1.2.3