diff --git a/app.lisp b/app.lisp index 9886106..6c785d5 100644 --- a/app.lisp +++ b/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. diff --git a/src/config.lisp b/src/config.lisp index 8ed7377..c993173 100644 --- a/src/config.lisp +++ b/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")