user.clj 692 Bytes
Newer Older
Vlad Dumitru's avatar
Vlad Dumitru committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(ns user
  "Userspace functions you can run by default in your local REPL."
  (:require
   [konditorei.config :refer [env]]
    [clojure.pprint]
    [clojure.spec.alpha :as s]
    [expound.alpha :as expound]
    [mount.core :as mount]
    [konditorei.core :refer [start-app]]))

(alter-var-root #'s/*explain-out* (constantly expound/printer))

(add-tap (bound-fn* clojure.pprint/pprint))

(defn start
  "Starts application.
  You'll usually want to run this on startup."
  []
  (mount/start-without #'konditorei.core/repl-server))

(defn stop
  "Stops application."
  []
  (mount/stop-except #'konditorei.core/repl-server))

(defn restart
  "Restarts application."
  []
  (stop)
  (start))