File tree 3 files changed +30
-2
lines changed
3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change
1
+ (ns user
2
+ (:require [com.stuartsierra.component :as component]
3
+ [clojure.tools.namespace.repl :refer (refresh )]
4
+ [replme.core :as app]))
5
+
6
+ (def system nil )
7
+
8
+ (defn init []
9
+ (alter-var-root #'system
10
+ (constantly (app/system {:port 8080 }))))
11
+
12
+ (defn start []
13
+ (alter-var-root #'system component/start))
14
+
15
+ (defn stop []
16
+ (alter-var-root #'system
17
+ (fn [s] (when s (component/stop s)))))
18
+
19
+ (defn go []
20
+ (init )
21
+ (start ))
22
+
23
+ (defn reset []
24
+ (stop )
25
+ (refresh :after 'user/go))
Original file line number Diff line number Diff line change 22
22
:source-paths [" src" ]
23
23
24
24
:profiles {:uberjar {:main replme.core
25
- :aot [replme.core]}}
25
+ :aot [replme.core]}
26
+
27
+ :dev {:source-paths [" dev" ]
28
+ :dependencies [[org.clojure/tools.namespace " 0.2.3" ]]}}
26
29
27
30
:cljsbuild {
28
31
:builds [{:id " replme"
Original file line number Diff line number Diff line change 5
5
[replme.web.routes :as routes])
6
6
(:gen-class true :main ))
7
7
8
- (defn- system
8
+ (defn system
9
9
[{:keys [port docker-url]
10
10
:or {port 8080 docker-url " unix:///var/run/docker.sock" }}]
11
11
(component/system-map
You can’t perform that action at this time.
0 commit comments