Self-contained example: Express on ScalaJS on NodeJS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
project
src/main/scala
.gitignore
.scalafmt.conf
README.md Add use cases Apr 15, 2017
build.sbt
package-lock.json
package.json

README.md

Express on ScalaJS on NodeJS

Self-contained example for scalajs-io/express by Lawrence Daniels

Proof of concept if you wanted to integrate with the NodeJS platform rather than the JVM. Two cases spring to my mind:

  • Some NodeJS libraries may be higher quality than JVM ones. In my case, EventSource.
  • Migrating incrementally from NodeJS to Scala without committing the heinous act known as a code rewrite.

Instructions

Install SBT and NodeJS.

$ git clone https://github.com/scalajs-io/express
$ cd express; npm install; sbt publishLocal; cd ..
$ git clone https://github.com/ScalaWilliam/express-scalajs-nodejs-demo
$ cd express-scalajs-nodejs-demo; npm install; sbt run

Then go to localhost:8080.