aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-10 16:00:50 +0100
committerSimon Ser <contact@emersion.fr>2019-12-10 16:00:53 +0100
commita9a607b9b26c5d63e773deb639f2abf9d4847f8c (patch)
tree6ae294516596ce700ade04dbb6b7f6783a1190db /README.md
parentc5afd1a61b06b3d5bd7287d1596b05d4c18ac138 (diff)
downloadalps-a9a607b9b26c5d63e773deb639f2abf9d4847f8c.tar.gz
alps-a9a607b9b26c5d63e773deb639f2abf9d4847f8c.zip
Allow plugins to add new routes
References: https://todo.sr.ht/~sircmpwn/koushin/6
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 2 insertions, 0 deletions
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