drama - A drama library for NodeJS.
Actor model implementation for JavaScript and Node.js (work in progress)
$ sbt clean publish-localBefore running the tests the first time, you must ensure the npm packages are installed:
$ npm installThen you can run the tests:
$ sbt testimport 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 lawrence.daniels@gmail.com
*/
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")