website/src/app.lisp

28 lines
776 B
Common Lisp
Raw Normal View History

2024-10-05 22:05:26 +09:00
(defpackage #:hp/app
2024-02-02 01:07:19 +09:00
(:use #:cl)
2025-03-29 01:07:45 +09:00
(:import-from #:jingle
#:make-app
#:install-middleware
2025-03-29 03:46:58 +09:00
#:static-path
2025-03-29 01:07:45 +09:00
#:configure)
(:import-from #:ningle-fbr
#:set-routes)
2024-12-20 15:25:14 +09:00
(:import-from #:hp/middlewares/recoverer
#:*recoverer*)
2025-03-29 03:46:58 +09:00
(:import-from #:lack-mw
2024-12-20 15:25:14 +09:00
#:*trim-trailing-slash*)
2024-10-03 14:48:42 +09:00
(:import-from #:hp/renderer)
2024-10-05 22:05:26 +09:00
(:export #:*app*))
(in-package #:hp/app)
2025-03-29 01:07:45 +09:00
(defparameter *app*
(let ((app (make-app)))
(set-routes app :system :hp :target-dir-path "routes")
(install-middleware app *recoverer*)
(install-middleware app *trim-trailing-slash*)
2025-03-30 17:13:52 +09:00
(static-path app "/img/" "static/img/")
(static-path app "/style/" "static/style/")
2025-03-29 01:07:45 +09:00
(configure app)))
2024-02-14 00:15:37 +09:00
2025-03-29 01:07:45 +09:00
*app*