express-scalajs-nodejs-demo

Self-contained example: Express on ScalaJS on NodeJS

Stars
5

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.