https://github.com/scalajs-io/drama
drama is an Actor model implementation for JavaScript and Node.js
https://github.com/scalajs-io/drama
actor-model drama node nodejs npm npm-package scala scalajs
Last synced: 4 months ago
JSON representation
drama is an Actor model implementation for JavaScript and Node.js
- Host: GitHub
- URL: https://github.com/scalajs-io/drama
- Owner: scalajs-io
- License: apache-2.0
- Created: 2017-02-13T04:29:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-17T23:08:09.000Z (about 6 years ago)
- Last Synced: 2025-01-17T22:42:42.915Z (5 months ago)
- Topics: actor-model, drama, node, nodejs, npm, npm-package, scala, scalajs
- Language: Scala
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Drama API for Scala.js
================================
[drama](https://www.npmjs.com/package/drama) - A drama library for NodeJS.### Description
Actor model implementation for JavaScript and Node.js (work in progress)
### Build Dependencies
* [SBT v1.2.x](http://www.scala-sbt.org/download.html)
### Build/publish the SDK locally
```bash
$ sbt clean publish-local
```### Running the tests
Before running the tests the first time, you must ensure the npm packages are installed:
```bash
$ npm install
```Then you can run the tests:
```bash
$ sbt test
```### Examples
```scala
import io.scalajs.npm.drama._
import scala.scalajs.jsval 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:
```sbt
libraryDependencies += "io.scalajs.npm" %%% "drama" % "0.5.0"
```Optionally, you may add the Sonatype Repository resolver:
```sbt
resolvers += Resolver.sonatypeRepo("releases")
```