Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (46 sloc) 1.15 KB
;; See
;; for explanation.
(require 'clack)
(require 'lack)
(defparameter *subtitle* "<h2>--- With Default Settings ---</h2>")
;; information to extract from :lack.session.options from env
(defparameter *options*
(list :new-session :change-id :no-store :expire :expires))
;; Echos session info
(defparameter *my-echo*
(lambda (env)
(let* ((session (getf env :lack.session))
(counter (gethash :visit session -1)))
(setf (gethash :visit session) (incf counter))
`(200 (:content-type "text/html")
(list "<html><h1>Lack Session Middleware Test</h1>"
(format nil "<li>Visiting times: ~A</li>" counter))
(mapcar (lambda (key)
(let ((val (getf (getf env :lack.session.options)
(format nil "<li>~A = ~A</li>" key val)))
(list "</ul></html>"))))))
;; Creates Lack Application
(defparameter *app*
;; Starts the Web server
(defparameter *handler*
(clack:clackup *app*))
;; Stops the Web server
; (clack:stop *handler*)