Permalink
Browse files

Pulled mongo db-name into ./config.clj

  • Loading branch information...
1 parent 0f890da commit 758fdd9edf7473175a45a10717f037413fff6d83 @amcnamara amcnamara committed Dec 30, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −0 config.clj
  2. +2 −2 src/foreclojure/mongo.clj
View
@@ -1,5 +1,6 @@
{:wrap-reload false
:db-host "localhost"
+ :db-name "mydb"
:db-user nil
:db-pwd nil
:jetty-port 8080
@@ -6,10 +6,10 @@
[foreclojure.users :only [get-users]]))
(defn connect-to-db []
- (let [{:keys [db-user db-pwd db-host]} config]
+ (let [{:keys [db-user db-pwd db-host db-name]} config]
(mongo!
:host (or db-host "localhost")
- :db "mydb")
+ :db (or db-name "mydb"))
(when (and db-user db-pwd)
(authenticate db-user db-pwd))))

0 comments on commit 758fdd9

Please sign in to comment.