Skip to content

Commit 015b103

Browse files
committed
ctype is json
1 parent 5a58674 commit 015b103

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: lein trampoline run $PORT
1+
web: lein trampoline run

project.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@
2828
catch [[:inner 0]]}}
2929
:main ^:skip-aot firedamp.core
3030
:target-path "target/%s"
31-
:profiles {:uberjar {:aot :all}})
31+
:profiles {:uberjar {:aot :all}
32+
:dev {:env {:port 8080}}})

src/firedamp/core.clj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[clj-time.format :as time-format]
1111
[clojure.core.match :as cmatch]
1212
[clojure.core.reducers :as r]
13-
[environ.core :as env]
13+
[environ.core :refer [env]]
1414
[manifold.deferred :as md]
1515
[manifold.time :as mt]
1616
[taoensso.timbre :as timbre]
@@ -157,7 +157,7 @@
157157
:last-update (time-coerce/to-date last-update)}
158158
as-json (json/generate-string body {:pretty true})]
159159
{:status 200
160-
:headers {"content-type" "text/plain"}
160+
:headers {"content-type" "application/json"}
161161
:body as-json}))
162162

163163
(cjc/defroutes app
@@ -167,8 +167,7 @@
167167

168168
(defn -main
169169
[& args]
170-
(let [port (Integer/parseInt (first args))]
171-
(prn port)
170+
(let [port (Integer/parseInt (:port env))]
172171
(init-metrics!)
173172
(http/start-server app {:port port :host "0.0.0.0"})
174173
(keep-checking (mt/minutes 2))

0 commit comments

Comments
 (0)