-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.lisp
39 lines (37 loc) · 949 Bytes
/
app.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
(ql:quickload :wsd-caveman-chat)
(defpackage wsd-caveman-chat.app
(:use :cl)
(:import-from :lack.builder
:builder)
(:import-from :ppcre
:scan
:regex-replace)
(:import-from :wsd-caveman-chat.web
:*web*)
(:import-from :wsd-caveman-chat.config
:config
:productionp
:*static-directory*))
(in-package :wsd-caveman-chat.app)
(builder
(:static
:path (lambda (path)
(if (ppcre:scan "^(?:/images/|/css/|/js/|/robot\\.txt$|/favicon\\.ico$)" path)
path
nil))
:root *static-directory*)
(if (productionp)
nil
:accesslog)
(if (getf (config) :error-log)
`(:backtrace
:output ,(getf (config) :error-log))
nil)
:session
(if (productionp)
nil
(lambda (app)
(lambda (env)
(let ((datafly:*trace-sql* t))
(funcall app env)))))
*web*)