Skip to content

Instantly share code, notes, and snippets.

@owainlewis
Last active December 15, 2015 21:29
Show Gist options
  • Save owainlewis/5326227 to your computer and use it in GitHub Desktop.
Save owainlewis/5326227 to your computer and use it in GitHub Desktop.
Play 2 Scala Console

It is not immediately obvious how to use the play console so this might help.

Play2 provides an equivalent of the rails console you might be used to.

Use

cd myapp
play console

In the console run

> import play.core._
> new StaticApplication(new java.io.File("."))

You can now import models etc

import models.User._
User.createOne(1, "Joe", "[email protected]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment