File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1- web :  lein trampoline run  $PORT 
1+ web :  lein trampoline run
Original file line number Diff line number Diff line change 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 }}})
Original file line number Diff line number Diff line change 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]
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 
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 ))
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments