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.
 
 
 
 

40 lines
959 B

  1. (ql:quickload :universe-time-calc)
  2. (defpackage universe-time-calc.app
  3. (:use :cl)
  4. (:import-from :lack.builder
  5. :builder)
  6. (:import-from :ppcre
  7. :scan
  8. :regex-replace)
  9. (:import-from :universe-time-calc.web
  10. :*web*)
  11. (:import-from :universe-time-calc.config
  12. :config
  13. :productionp
  14. :*static-directory*))
  15. (in-package :universe-time-calc.app)
  16. (builder
  17. (:static
  18. :path (lambda (path)
  19. (if (ppcre:scan "^(?:/images/|/css/|/js/|/robot\\.txt$|/favicon\\.ico$)" path)
  20. path
  21. nil))
  22. :root *static-directory*)
  23. (if (productionp)
  24. nil
  25. :accesslog)
  26. (if (getf (config) :error-log)
  27. `(:backtrace
  28. :output ,(getf (config) :error-log))
  29. nil)
  30. :session
  31. (if (productionp)
  32. nil
  33. (lambda (app)
  34. (lambda (env)
  35. (let ((datafly:*trace-sql* t))
  36. (funcall app env)))))
  37. *web*)