From 9b61e7a98167ad96ce3ded0bda64dcc367de65e2 Mon Sep 17 00:00:00 2001 From: Brian Guarraci Date: Fri, 21 Jul 2023 17:59:23 -0600 Subject: [PATCH] add doc strings --- klongpy/web/sys_fn_web.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/klongpy/web/sys_fn_web.py b/klongpy/web/sys_fn_web.py index a245e1d..6835aeb 100644 --- a/klongpy/web/sys_fn_web.py +++ b/klongpy/web/sys_fn_web.py @@ -37,12 +37,17 @@ def eval_sys_fn_create_web_server(klong, x, y, z): The web server is started at the address specifed by "x": - If "x" is an integer, then it is interpreted as a port in "localhost:". - if "x" is a string, then it is interpreted as a host address ":" + If "x" is an integer, then it is interpreted as a port in "0.0.0.0:". + if "x" is a string, then it is interpreted as a bind address ":" GET routes are specified in a dictionary provided by "y". POST routes are specified in a dictionary provided by "z". + Handler callbacks are called with a dictionary of parameters: + + GET handlers are provided a dictionary of query parameters. + POST handlers are provided a dictionary of post body parameters. + Example: .py("klongpy.web")