title: How to connect to PostgreSQL in Heroku with Luminus?
body: <p>I just created a Luminus app and it has two separate places where database access is defined. In project.clj for ragtime:</p>
  
  <pre><code>:ragtime {:migrations ragtime.sql.files/migrations
            :database "jdbc:postgresql://localhost/foobar?user=db_user_name_here&amp;password=db_user_password_here"}
  </code></pre>
  
  <p>and in src/foobar/db/core.clj:</p>
  
  <pre><code>(def db-spec
    {:subprotocol "postgresql"
     :subname "//localhost/foobar"
     :user "db_user_name_here"
     :password "db_user_password_here"})
  </code></pre>
  
  <p>Has anybody ever wrote code to break down the DATABASE_URL Heroku provides, or somehow use it for the connection? Surely I'm not the first one to want to do this, right?</p>
  
  <p>Also, in the process, it would be nice to have separate credentials for development and production.</p>