mount/dev/clj/dev.clj
anatoly e3066fe024 refactoring mount sample app
drinking more "pure tea"
2016-01-14 00:24:51 -05:00

44 lines
1.1 KiB
Clojure

(ns dev
(:require [clojure.pprint :refer [pprint]]
[clojure.tools.namespace.repl :as tn]
[boot.core :refer [load-data-readers!]]
[mount.core :as mount]
[mount.tools.graph :refer [states-with-deps]]
[app.utils.logging :refer [with-logging-status]]
[app.www]
[app.db :refer [conn]]
[app.example]
[app.nyse :refer [find-orders add-order]])) ;; <<<< replace this your "app" namespace(s) you want to be available at REPL time
(defn start []
(with-logging-status)
(mount/start #'app.conf/config
#'app.db/conn
#'app.www/nyse-app
#'app.example/nrepl)) ;; example on how to start app with certain states
(defn stop []
(mount/stop))
(defn refresh []
(stop)
(tn/refresh))
(defn refresh-all []
(stop)
(tn/refresh-all))
(defn go
"starts all states defined by defstate"
[]
(start)
:ready)
(defn reset
"stops all states defined by defstate, reloads modified source files, and restarts the states"
[]
(stop)
(tn/refresh :after 'dev/go))
(mount/in-clj-mode)
(load-data-readers!)