cljobq-web.core
make-handler
(make-handler)
(make-handler config)
Returns a Ring handler function providing the cljobq web UI.
Options:
:db
Aclojure.java.jdbc
db-spec map. If specified, it is used in preference to the db-spec in thecontext
.:context
cljobq context created viacljobq.core/make-context
. If not specified, the implicitcljobq.core/global-ctx*
atom set usingcljobq.core/set-context!
is used instead. If:db
is specified, that is used instead of any db-spec in the specified context.:base-url
Specify a base url under which cljobq-web is being served. This affects the generated HTML only, e.g. affects links, CSS and JS urls. If omitted, assumes relative links such as/job/abc
will find their way to cljobq-web. If, however, cljobq-web is being fronted under, say,/cljobq
,:base-url
should be set to that.
Example:
(def cljobq-handler
(cljobq-web.core/make-handler
{:db {:connection-uri "jdbc:postgresql://localhost:5432/jobqtest?user=test&password=test"}))