I have a Play Framework 2.3 app. I can drop into a Scala console with activator console
. However, when I try to call into code from my app, specifically some helper function which uses WS
, which uses the implicit import play.api.Play.current
to retrieve the currently running app, I get the error message java.lang.RuntimeException: There is no started application
.
What steps do I have to take to be able to load my app into the current console session?
There is a similar existing question, but the accepted answer appears to be using a mock app from the framework's test helpers. Preferably, I would like to run in the context of my actual app. If I must use a fake app, would it be possible to make it match my development environment (what I get when running activator run
) rather than my test environment (what I get when running the unit tests)?
Thanks in advance!
StaticApplication
#24435915 This question essentially asks the same thing, except for models that require the database. The common ground is that they both require the implicit app. – Torsk