drama - A drama library for NodeJS.
Actor model implementation for JavaScript and Node.js (work in progress)
$ sbt clean publish-local
Before running the tests the first time, you must ensure the npm packages are installed:
$ npm install
Then you can run the tests:
$ sbt test
import io.scalajs.npm.drama._
import scala.scalajs.js
val actorSystem = Drama("sys")
val actor = actorSystem.actor(new GreetingActor())
actor ! "sayHello" -> "Hello"
actor ! "sayHello" -> "Bon jour"
actor ! "sayHello" -> "Buenos dias"
/**
* Greeting Actor
* @author [email protected]
*/
class GreetingActor() extends js.Object {
def sayHello(message: String): Unit = println("Received: %s", message)
}
To add the Drama
binding to your project, add the following to your build.sbt:
libraryDependencies += "io.scalajs.npm" %%% "drama" % "0.5.0"
Optionally, you may add the Sonatype Repository resolver:
resolvers += Resolver.sonatypeRepo("releases")