I've you're running against an h2 database, you can add the following to the end of your Boot.boot to launch the h2 web console when every you start up jetty. It's a very simple web interface to the database, but super convenient (it will even launch your browser for you):
if (Props.devMode) {
import org.h2.server.web.WebServer
import _root_.org.h2.tools.Server
import _root_.org.h2.util.StartBrowser
val webServer = new WebServer()
val server = new Server(webServer, "-webPort", "0")
server.start
DBVendor.newConnection(DefaultConnectionIdentifier).map(c=> {
val url = webServer.addSession(c)
StartBrowser.openURL(url)
})
}
To start using h2, if you're not already:
add this to the <dependencies> section of your pom.xml:
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.2.121</version>
</dependency>
And change this in Boot.scala:
from: DB.defineConnectionManager(DefaultConnectionIdentifier, DBVendor)
to:
DB.defineConnectionManager(DefaultConnectionIdentifier,
new StandardDBVendor(Props.get("db.driver") openOr "org.h2.Driver",
Props.get("db.url") openOr "jdbc:h2:lift_proto.db",
Props.get("db.user"), Props.get("db.password")))