Created
May 3, 2014 17:01
-
-
Save pedrofurla/752108dc505c52fd2657 to your computer and use it in GitHub Desktop.
Start and stop H2 DB server from SBT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val startH2Task = TaskKey[Unit]("start-h2", "Starts H2 DB") | |
| val stopH2Task = TaskKey[Unit]("stop-h2", "Stops H2 DB") | |
| val h2tasks:Seq[Setting[_]] = Seq(startH2Task := { | |
| org.h2.tools.Server.createTcpServer().start(); | |
| org.h2.tools.Server.createWebServer().start // this starts the "web tool" | |
| }, stopH2Task :={ | |
| org.h2.tools.Server.shutdownTcpServer("tcp://localhost:9092","",true,true); | |
| } ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment