Created
December 21, 2011 10:58
-
-
Save toddsundsted/1505615 to your computer and use it in GitHub Desktop.
Creating a Running Application Inside the Play Console
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
import play.core._ | |
import play.api._ | |
import play.api.mvc._ | |
import java.io._ | |
import play.api.Play.current | |
val app = Application(new File("."), new ApplicationClassLoader(this.getClass.getClassLoader), None, Play.Mode.Dev) | |
Play.start(app) | |
current // should not fail | |
import play.api.db._ | |
val db = DB.getDataSource() | |
implicit val connection = db.getConnection() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment