Skip to content

drama is an Actor model implementation for JavaScript and Node.js

License

Notifications You must be signed in to change notification settings

scalajs-io/drama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drama API for Scala.js

drama - A drama library for NodeJS.

Description

Actor model implementation for JavaScript and Node.js (work in progress)

Build Dependencies

Build/publish the SDK locally

 $ sbt clean publish-local

Running the tests

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

Examples

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)

}

Artifacts and Resolvers

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") 

About

drama is an Actor model implementation for JavaScript and Node.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages