Skip to content

Instantly share code, notes, and snippets.

@toddsundsted
Created December 21, 2011 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toddsundsted/1505615 to your computer and use it in GitHub Desktop.
Save toddsundsted/1505615 to your computer and use it in GitHub Desktop.
Creating a Running Application Inside the Play Console
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