The first thing we need to learn while working with databases is how to connect the application that we will build with the database itself.
In this recipe, we will show you how to configure Lift to connect with the database of our choice. For this recipe, we will use PostgreSQL; however, other databases can also be used:
build.sbtfile to add the lift-mapper and PostgreSQL driver dependencies:
"net.liftweb" %% "lift-mapper" % liftVersion % "compile", "org.postgresql" % "postgresql" % "9.2-1003-jdbc4" % "compile"
Now carry out the following steps to configure a connection with the database: