kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 23047d4c2f2d94bd96333f3530f0d0f563d6d74b
parent a29700f26d01fe1e6ed138e2ea5a8e6d5810054f
Author: Joris Vink <joris@coders.se>
Date:   Mon, 31 Jan 2022 20:44:14 +0100

Rework generic example configuration.

This adjusts the configuration to contain updated routing configs.

Diffstat:
examples/generic/conf/generic.conf | 60+++++++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 45 insertions(+), 15 deletions(-)

diff --git a/examples/generic/conf/generic.conf b/examples/generic/conf/generic.conf @@ -28,24 +28,54 @@ domain * { certkey cert/key.pem accesslog kore_access.log - route /css/style.css asset_serve_style_css - route / asset_serve_index_html - route /intro.jpg asset_serve_intro_jpg - route /b64test serve_b64test - route /upload serve_file_upload - route /validator serve_validator - route /params-test serve_params_test - route /private serve_private + route /css/style.css { + handler asset_serve_style_css + methods get + } + + route / { + handler asset_serve_index_html + methods get + } + + route /intro.jpg { + handler asset_serve_intro_jpg + methods get + } + + route /b64test { + handler serve_b64test + methods get + } - route /private/test asset_serve_private_test_html auth_example + route /upload { + handler serve_file_upload + methods get post + } + + route /validator { + handler serve_validator + methods get + } + + route /params-test { + handler serve_params_test + methods get post + + validate qs:get arg1 v_example + validate qs:get id v_number + + validate post test1 v_example + validate post test2 v_regex + } - params post /params-test { - validate test1 v_example - validate test2 v_regex + route /private { + handler serve_private + methods get } - params get /params-test { - validate arg1 v_example - validate id v_number + route /private/test { + handler asset_serve_private_test_html + authenticate auth_example } }