On Aug 9, 12:22 pm, mmwaikar <mmwai...@gmail.com> wrote:
> Hi,
>
> Assuming there are some DB credentials specified in a project.clj file as a
> map, how should I read those credentials in my clojure code -
>
> 1) should I use slurp and then parse that text?
> 2) should I (use 'leiningen.core) and then (load-file "project.clj")
> 3) or something else
>
> Please let me know the best / idiomatic way to accomplish this.

project.clj is available to Leiningen plugins. Assuming you are open
to put the DB credentials elsewhere, I'd suggest putting it in another
file that can be easily discoverable. This idea is implemented in Clj-
DBCP:

https://bitbucket.org/kumarshantanu/clj-dbcp/overview (jump to the
section "Create DataSource from `.properties` file")

Regards,
Shantanu

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to