-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.boot
54 lines (50 loc) · 1.73 KB
/
build.boot
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(set-env!
:source-paths #{"src"}
:resource-paths #{"resources"}
:dependencies '[[adzerk/boot-reload "0.4.13" :scope "test"]
[org.clojure/clojure "1.8.0"]
[org.clojure/java.jdbc "0.4.2"]
[com.h2database/h2 "1.4.191"]
[yesql "0.5.2"]
[environ"1.0.3"]
[boot-environ "1.0.3"]
[org.danielsz/system "0.4.0"]
[ring/ring-core "1.4.0"]
[ring/ring-defaults "0.1.5"]
[ring/ring-jetty-adapter "1.4.0"]
[ring-middleware-format "0.7.0"]
[compojure "1.4.0"]
[hiccup "1.0.5"]
[clj-http "2.0.1"]
[org.clojure/data.json "0.2.6"]])
(require
'[adzerk.boot-reload :refer [reload]]
'[example.systems :refer [base-system]]
'[environ.boot :refer [environ]]
'[system.boot :refer [system run]])
(deftask dev
"Run a restartable system in the Repl"
[]
(comp
(environ :env {:http-port "3025"
:imdb-key "348b843dca6130f34597bea34cb95701"})
(watch :verbose true)
(system :sys #'base-system :auto true :files ["handler.clj"])
(repl :server true)))
(deftask dev-run
"Run a restartable system in the Repl"
[]
(comp
(environ :env {:http-port "3025"
:imdb-key "348b843dca6130f34597bea34cb95701"})
(run :main-namespace "example.core" :arguments [#'base-system])
(wait)))
(deftask prod-run
"Run a restartable system in the Repl"
[]
(comp
(environ :env {:db "default-db-spec"
:http-port "8008"
:imdb-key "348b843dca6130f34597bea34cb95701"})
(run :main-namespace "example.core" :arguments [#'base-system])
(wait)))