A website for producing interactive charts without writing a single line of code. Built with Common Lisp and Python.
https://charts.craigoates.net
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.
42 lines
963 B
42 lines
963 B
2 years ago
|
(ql:quickload :hot-line)
|
||
|
|
||
|
(defpackage hot-line.app
|
||
|
(:use :cl)
|
||
|
(:import-from :lack.builder
|
||
|
:builder)
|
||
|
(:import-from :ppcre
|
||
|
:scan
|
||
|
:regex-replace)
|
||
|
(:import-from :hot-line.web
|
||
|
:*web*)
|
||
|
(:import-from :hot-line.config
|
||
|
:config
|
||
|
:productionp
|
||
|
:*static-directory*))
|
||
|
(in-package :hot-line.app)
|
||
|
|
||
|
(funcall clack-errors:*clack-error-middleware*
|
||
|
(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*)
|
||
|
:debug t)
|