This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-27
Channels
- # admin-announcements (9)
- # aws (1)
- # beginners (4)
- # boot (197)
- # cider (38)
- # cljsrn (70)
- # clojure (128)
- # clojure-russia (36)
- # clojurecup (1)
- # clojurescript (86)
- # core-typed (2)
- # css (1)
- # datomic (35)
- # editors-rus (4)
- # hoplon (22)
- # ldnclj (2)
- # mount (19)
- # off-topic (45)
- # om (63)
- # onyx (7)
- # parinfer (8)
- # yada (2)
(ns app.db
(:require [mount.core :refer [defstate]]
[app.datomic-seed :as ds]))
(defstate conn :start (ds/get-conn))
(ns app.api
(:require
[app.db :refer [conn]]
[app.datomic-query :as dq]
[castra.core :refer [defrpc]]))
(defrpc get-state []
{:random (dq/fetch-random-data conn)})
@raymcdermott: start
function lives in mount.core
, not mount
.
I created a simple lein-ring
example app in lein-ring
mount branch:
:ring {:handler app.www/mount-example-routes
:init mount.core/start
:port 4242}
here is an example: https://github.com/tolitius/mount/blob/lein-ring/project.clj#L33