Server side javascript on Google app engine

2019-03-24 16:00发布

问题:

Is there any way to run a Javascript engine, like Spidermonkey, on Google App Engine? Spidermonkey is a C module, so obviously that wont work (GAE doesn't allow those types of modules)... is there something else available?

回答1:

Google is now supporting custom language on Google App Engine. So we can do Node.js

https://www.youtube.com/watch?v=Q8jZHc0NS6A

https://developers.google.com/cloud/managed-vms



回答2:

Here is an article about running Rhino on AppEngine/Java. That should get you a long way towards a real, functioning JavaScript application on AppEngine.



回答3:

If you are looking for a JavaScript framework (as opposed to calling Java methods from JavaScript) you could try RingoJS (formerly Helma NG). It's a Rhino-based JavaScript framework that can run in AppEngine.

There's also AppengineJS, which can run on RingoJS (or Narwhal, which I haven't personally used). It's a port of the Python SDK (with mostly predictable changes to fit JavaScript conventions better). It's not complete, but it's close enough to work in most cases. It's nicer to use than using the Java API directly.



回答4:

I've also built ApeJS if you want to try it out. It's much more minimal than the competition.