diff options
author | Tom Willemse | 2013-08-25 23:21:39 +0200 |
---|---|---|
committer | Tom Willemse | 2013-08-25 23:21:39 +0200 |
commit | 96bfb88a5e348c7bfad56d34eebaa891b68e2773 (patch) | |
tree | 52a7c9ab13f3e2c6e658980cf547a095e7e1b1a2 /hypo.hy | |
parent | 71adee48209840198f90a6b9da33b73830ebbfeb (diff) | |
download | hypo-96bfb88a5e348c7bfad56d34eebaa891b68e2773.tar.gz hypo-96bfb88a5e348c7bfad56d34eebaa891b68e2773.zip |
Update README, add index page
Diffstat (limited to 'hypo.hy')
-rwxr-xr-x | hypo.hy | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -28,7 +28,8 @@ (sys.exit 1))) (def render (web.template.render "templates/")) -(def urls (, (+ "/" *prefix* "raw/(.*)") "raw" +(def urls (, (+ "/" *prefix*) "index" + (+ "/" *prefix* "raw/(.*)") "raw" (+ "/" *prefix* "dl/(.*)") "download" (+ "/" *prefix* "([a-f0-9]{7})$") "html" (+ "/" *prefix* "(.*)") "upload")) @@ -137,6 +138,9 @@ If no lexer is found fallback onto the text lexer." (setv web.ctx.status (str "201 Created")) (+ web.ctx.home "/" *prefix* (get h 0) "\n")))]]) +(defclass index [] + [[GET (lambda [self] (render.index))]]) + (defun hypo-start [argv] (let ((sys.argv (cdr sys.argv)) (app (web.application urls (globals)))) |