是否可以使用Node.js或其他一些服务器端JavaScript方法开发Google App Engine Web应用程序?

时间:2021-09-05 15:54:40

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?

我一直在关注服务器端JavaScript的最新发展 - 特别是Node.js - 并想知道是否有可能使用这种方法开发Google App Engine Web应用程序 - 与Python或Java分开或结合使用?

5 个解决方案

#1


19  

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

node.js使用的事件循环模型并不适合当前的App Engine设计。

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.

但是,有几个项目将JavaScript引入App Engine。查看App Engine问题35,了解一些解决方案。亮点是:Rhino,Rhino For Webapps,如果你喜欢Python,请查看AppengineJS。我也听说过RingoJS可能值得研究。

#2


3  

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

您也可以查看ApeJS。我写的一个小框架类似于AppengineJS,但更简约。

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

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

#3


2  

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.

Tornado可以在app引擎上运行,类似于node.js但是使用python,并且也有一个很好的yield方法。但龙卷风在app引擎上的使用存在局限性,这可能会破坏将其用于项目的目标。请参阅github上的tornado以获取更多信息我同时使用node.js和connect middelware以及express.js,以使节点更易于用于简单的Web应用程序。

#4


1  

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

现在最好的选择是在此处使用Google Compute Engine和Datastore>链接

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

您可以使用Google Compute Engine托管您的node.js应用,并使用google-api-nodejs-client连接到数据存储区:

  1. You need to create a project in Google API Console, and activate Compute Engine service for it
  2. 您需要在Google API控制台中创建项目,并为其激活Compute Engine服务
  3. You have to enable Google Cloud Datastore API (see link above)
  4. 您必须启用Google Cloud Datastore API(请参阅上面的链接)
  5. You need to set your dataset-id (same identifier as your Google Cloud Project ID).
  6. 您需要设置dataset-id(与Google Cloud Project ID相同的标识符)。
  7. 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).
  8. 您需要使用数据存储区和userinfo.email范围连接到Compute Engine实例(node.js支持基于证书的服务帐户尚未实现)。
  9. You need a working node.js environment in your Compute Engine machine.
  10. 您需要在Compute Engine计算机中使用一个有效的node.js环境。
  11. npm install google-api-nodejs-client in your administration command-line tool
  12. npm在管理命令行工具中安装google-api-nodejs-client

And you should be ready to go

你应该准备好了

#5


0  

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

虽然与纯app引擎不同(例如手动缩放和当前处于alpha状态),但现在可以使用Appengine Managed VMs。

See:

看到:

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

他们还宣布了一个Node.JS库,用于与谷歌云平台合作。

#1


19  

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

node.js使用的事件循环模型并不适合当前的App Engine设计。

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.

但是,有几个项目将JavaScript引入App Engine。查看App Engine问题35,了解一些解决方案。亮点是:Rhino,Rhino For Webapps,如果你喜欢Python,请查看AppengineJS。我也听说过RingoJS可能值得研究。

#2


3  

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

您也可以查看ApeJS。我写的一个小框架类似于AppengineJS,但更简约。

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

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

#3


2  

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.

Tornado可以在app引擎上运行,类似于node.js但是使用python,并且也有一个很好的yield方法。但龙卷风在app引擎上的使用存在局限性,这可能会破坏将其用于项目的目标。请参阅github上的tornado以获取更多信息我同时使用node.js和connect middelware以及express.js,以使节点更易于用于简单的Web应用程序。

#4


1  

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

现在最好的选择是在此处使用Google Compute Engine和Datastore>链接

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

您可以使用Google Compute Engine托管您的node.js应用,并使用google-api-nodejs-client连接到数据存储区:

  1. You need to create a project in Google API Console, and activate Compute Engine service for it
  2. 您需要在Google API控制台中创建项目,并为其激活Compute Engine服务
  3. You have to enable Google Cloud Datastore API (see link above)
  4. 您必须启用Google Cloud Datastore API(请参阅上面的链接)
  5. You need to set your dataset-id (same identifier as your Google Cloud Project ID).
  6. 您需要设置dataset-id(与Google Cloud Project ID相同的标识符)。
  7. 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).
  8. 您需要使用数据存储区和userinfo.email范围连接到Compute Engine实例(node.js支持基于证书的服务帐户尚未实现)。
  9. You need a working node.js environment in your Compute Engine machine.
  10. 您需要在Compute Engine计算机中使用一个有效的node.js环境。
  11. npm install google-api-nodejs-client in your administration command-line tool
  12. npm在管理命令行工具中安装google-api-nodejs-client

And you should be ready to go

你应该准备好了

#5


0  

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

虽然与纯app引擎不同(例如手动缩放和当前处于alpha状态),但现在可以使用Appengine Managed VMs。

See:

看到:

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

他们还宣布了一个Node.JS库,用于与谷歌云平台合作。