Is it possible to develop a Google App Engine web app using Node.js or some other server side JavaScript approach?

自古美人都是妖i 提交于 2019-11-30 11:02:58

问题


I've been following the latest developments with server-side JavaScript - especially Node.js - and wondering if there is any possibility of using such an approach to develop a Google App Engine web application - either separately from or in combination with Python or Java?


回答1:


node.js uses an event-loop model which is not really a good fit with the current App Engine design.

However, there are several projects that bring JavaScript to App Engine. Check out App Engine issue 35 to read about some of the solutions. The highlights are: Rhino, Rhino For Webapps, if you like Python check out AppengineJS. I have also heard that RingoJS might be worth looking into.




回答2:


Also you might want to check out ApeJS. A little framework I wrote similar to AppengineJS but more minimalist.

http://lmatteis.github.com/apejs/




回答3:


Tornado can run on app engine and is similar to node.js but using python, and has a nice yield approach too. But there are limitations with tornado's use on app engine that might defeat the object of using it for your project. See tornado on github for more info I use both but node.js with connect middelware and express.js to make node easier to use for simple web apps.




回答4:


Now the best option is to use Google Compute Engine and Datastore > link here

You can use Google Compute Engine to host your node.js app and use google-api-nodejs-client to connect to the datastore:

  1. You need to create a project in Google API Console, and activate Compute Engine service for it
  2. You have to enable Google Cloud Datastore API (see link above)
  3. You need to set your dataset-id (same identifier as your Google Cloud Project ID).
  4. You need to be connected to a Compute Engine instance with both the datastore and userinfo.email scopes (node.js support for certificate-based service accounts is not yet implemented).
  5. You need a working node.js environment in your Compute Engine machine.
  6. npm install google-api-nodejs-client in your administration command-line tool

And you should be ready to go




回答5:


While not the same as pure app engine (eg. manual scaling and currently in alpha status), this is now possible using Appengine Managed VMs.

See:

  • Appengine NodeJS Quickstart project
  • appengine-nodejs library

They also announced a Node.JS library for working with the google cloud platform.

  • gcloud-node library


来源:https://stackoverflow.com/questions/3927199/is-it-possible-to-develop-a-google-app-engine-web-app-using-node-js-or-some-othe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!