Browse Source

add config. code for DB in prod. and clack middleware debug.

stable
Craig Oates 2 years ago
parent
commit
83294f1d96
  1. 4
      app.lisp
  2. 11
      src/config.lisp

4
app.lisp

@ -38,4 +38,6 @@
(let ((datafly:*trace-sql* t))
(funcall app env)))))
*web*)
:debug t)
:debug (if (hot-line.config:productionp)
nil
t)) ; Added as part of clack-error-middleware.

11
src/config.lisp

@ -27,7 +27,11 @@
'())
(defconfig |production|
'())
`(:debug nil
:databases
((:maindb :sqlite3 :database-name ,(merge-pathnames #P"db/hot-line.db"
*application-root*)))))
(defconfig |test|
'())
@ -43,3 +47,8 @@
(defun productionp ()
(string= (appenv) "production"))
;;; Use this to change the environment between "development" and
;;; "production". This change is mostly to specifiy which database the
;;; system will use.
(setf (osicat:environment-variable "APP_ENV") "development")

Loading…
Cancel
Save