I'm developing a web project using Clojure, and I ran into the following problem.
I've defined a db connection with korma using the following code in (ns foo.models.db)
(defdb db
(mysql {:host "localhost"
:port "3306"
:db "foo"
:delimiters "`"
:user user
:password password}
)
and in LightTable I can initialize the server in an Instarepl using (use 'foo.repl) (start-server)
, and everything works fine with the database.
However, when I tried running the project in the console using lein ring server
, it throws an exception telling me
No valid DB connection selected
Any idea about how I can fix this problem? Thanks.