I've been working on building an application with Akka actors, and now that I've completed the actor-based business logic I'd like to give it a RESTful + websocket front-end. I'm trying to find instructions for how to setup Play within the context of an existing application. The only instructions I could find are how to create new Play applications. Is there any documentation on how to do this?
UPDATE: This question has more to do with the SBT setup than connecting the controllers to my actor based business logic. I tried to modify build.sbt
and plugins.sbt
to include the things that activator built when I did activator new
but IDEA is complaining about Cannot resolve symbol PlayScala
. Also I am wondering about moving my actors from the SBT-standard src/main/scala
to app/
-- should it be in app/actors
(as I saw in one of the templates) or in app/models
?
Here's my build.sbt
:
name := "test"
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(play.PlayScala)
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
specs2 % Test
)
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
scalaVersion := "2.11.6"
resolvers += "repo.novus rels" at "http://repo.novus.com/releases/"
resolvers += "repo.novus snaps" at "http://repo.novus.com/snapshots/"
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"
libraryDependencies += "com.github.nscala-time" %% "nscala-time" % "1.8.0"
libraryDependencies += "org.slf4j" % "slf4j-simple" % "1.6.4"
libraryDependencies += "org.reactivemongo" %% "reactivemongo" % "0.10.5.0.akka23"
routesGenerator := InjectedRoutesGenerator
and here is my plugins.sbt
:
logLevel := Level.Warn
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.0")
// web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.6")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")