Add not-found page

This commit is contained in:
Akira Tempaku 2024-02-24 20:31:06 +09:00
commit 44a2a26ffc
2 changed files with 21 additions and 0 deletions

View file

@ -2,6 +2,8 @@
(:use #:cl)
(:local-nicknames (#:jg #:jingle))
(:local-nicknames (#:fbr #:ningle-fbr))
(:local-nicknames (#:pi #:piccolo))
(:local-nicknames (#:cmp #:hp/components/*))
(:import-from #:lack)
(:export #:*app*
#:update-routes))
@ -9,6 +11,11 @@
(defparameter *raw-app* (jg:make-app))
(defmethod jg:not-found ((app jg:app))
(jg:with-html-response
(jg:set-response-status 404)
(pi:element-string (cmp:not-found-page))))
(defun update-routes ()
(fbr:enable-file-based-routing *raw-app*
:dir "src/routes"