Skip to content

Commit

Permalink
Make db work on server
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasbs committed Apr 28, 2012
1 parent 63c3653 commit 9c079ae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/hsnews/db.clj
Expand Up @@ -6,10 +6,9 @@
(def local-fallback-mongo )

(defn get-dotcloud-config []
(try
((read-json (slurp "/home/dotcloud/environment.json")
:DOTCLOUD_DATA_MONGODB_URL))
(catch Exception e nil))) ; silently fail when running locally
(try
((read-json (slurp "/home/dotcloud/environment.json")) :DATA_MONGODB_URL)
(catch Exception e (println e))))

; Taken from http://thecomputersarewinning.com/post/clojure-heroku-noir-mongo/
(defn split-mongo-url [url]
Expand Down

0 comments on commit 9c079ae

Please sign in to comment.