From a9a607b9b26c5d63e773deb639f2abf9d4847f8c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 10 Dec 2019 16:00:50 +0100 Subject: Allow plugins to add new routes References: https://todo.sr.ht/~sircmpwn/koushin/6 --- README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 7aa62f4..edb4aa5 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ API: * `koushin.on_render(name, f)`: prior to rendering the template `name`, call `f` with the template data * `koushin.set_filter(name, f)`: set a template function +* `koushin.set_route(method, path, f)`: register a new HTTP route, `f` will be + called with the HTTP context ## License -- cgit v1.2.3