A blogging website with a focus on collecting recipes and searching for them based on their ingredients.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
650 B

(in-package :cl-user)
(defpackage larder.web.web
(:use :cl
:caveman2
:larder.web.config
:larder.web.view
:larder.web.db
:datafly
:sxql)
(:export :*web*))
(in-package :larder.web.web)
;; for @route annotation
(syntax:use-syntax :annot)
;;
;; Application
(defclass <web> (<app>) ())
(defvar *web* (make-instance '<web>))
(clear-routing-rules *web*)
;;
;; Routing rules
(defroute "/" ()
(render #P"index.html"))
;;
;; Error pages
(defmethod on-exception ((app <web>) (code (eql 404)))
(declare (ignore app))
(merge-pathnames #P"_errors/404.html"
*template-directory*))