yanns / play-react

Proof of concept of running react.js on the server side with play
42 stars 5 forks source link

Add Javax js-engine support #3

Closed benmccann closed 9 years ago

benmccann commented 9 years ago

Implements https://github.com/yanns/play-react/issues/2

It looks like js-engine does support Nashorn. I haven't gotten a chance to test this, so you may want to in order to make sure it works as expected.

yanns commented 9 years ago

No luck so far:

Caused by: java.lang.Exception: Javascript engine 'js' not found
    at com.typesafe.jse.JavaxEngineShell.<init>(JavaxEngine.scala:91)
    at com.typesafe.jse.JavaxEngineShell$$anonfun$props$2.apply(JavaxEngine.scala:139)
    at com.typesafe.jse.JavaxEngineShell$$anonfun$props$2.apply(JavaxEngine.scala:139)
    at akka.actor.TypedCreatorFunctionConsumer.produce(Props.scala:343)
    at akka.actor.Props.newActor(Props.scala:252)
    at akka.actor.ActorCell.newActor(ActorCell.scala:552)
    at akka.actor.ActorCell.create(ActorCell.scala:578)
yanns commented 9 years ago

this a the same problem as in https://github.com/playframework/playframework/issues/2532 jse does not use the null in https://github.com/typesafehub/js-engine/blob/master/src%2Fmain%2Fscala%2Fcom%2Ftypesafe%2Fjse%2FJavaxEngine.scala#L89

yanns commented 9 years ago

let's try: https://github.com/typesafehub/js-engine/pull/38 ;)

yanns commented 9 years ago

I tried with the snapshot version of js-engine, and it works. I'll wait for a release and then merge your PR.

benmccann commented 9 years ago

@yanns maybe this one can be merged now that we're using the upgraded JS Engine

yanns commented 9 years ago

Yes, now it is working.