【问题标题】:Can we use Restler on Google App Engine我们可以在 Google App Engine 上使用 Restler
【发布时间】:2014-07-24 05:44:23
【问题描述】:

我想在 Google Cloud(Google App Engine 和 Restler RESTful API 服务器)上创建一个带有子域的网站:

http://api.restlerongooglecloud.com 用于混合应用(Android、iOS、Windows)joomla.restlerongooglecloud.com 用于博客,restlerongooglecloud.com 用于主页。

我想知道是否可以使用 GoogleAppEngine SDK 创建/准备网站以使用 Restler,然后将其作为指向 http://api.restlerongooglecloud.com 的实时网站上传到 Google App Engine。

Restler 使用 Composer 管理其依赖项,因此需要将 composer.phar 保存在项目文件夹中,最好保存在 usr/local/bin 中。

我的问题是,在本地机器上按照 Restler 文档进行所有设置并测试工作正常后,如果我将项目上传到 Google 云应用引擎,它会工作吗?

参考资料:

App Engine

Restler

在 Google App Engine Launcher(平台 Windows8)上,当我指向 url 时出现以下错误:

hxxp: // localhost:10085/api/public/examples/_001_helloworld/say/hello

{ "error": { "code": 404, "message": "Not Found" }, "debug": { "source": "Routes.php:359 at route stage", "stages": { "success": [ "get" ], "failure": [ "route", "negotiate", "message" ] } } }

如何解决这个问题?

app.yaml 如下:

application: restlerongae
version: 1

runtime: php

api_version: 1



handlers:
## api images
- url: /api/(.*\.(ico$|jpg$|png$|gif$))
  static_files: api/\1
  upload: api/(.*\.(ico$|jpg$|png$|gif$))
  application_readable: true

## api html
- url: /api/(.*\.(htm$|html$|css$|js$))
  static_files: api/\1
  upload: api/(.*\.(htm$|html$|css$|js$))
  application_readable: true

## api test1
- url: /api/(.*)
  script: api/public/examples/_001_helloworld/index.php

【问题讨论】:

  • @KrupaPatel,您在编辑帖子时应该更加小心。仅添加代码格式框不会使帖子更好。编辑时慢慢来,不要做马虎的工作。
  • 为什么不直接上传看看呢?
  • 我尝试上传 Restler 3 RC5 但无法正确配置app.yml

标签: php android google-app-engine restler


【解决方案1】:

Restler 3 RC5 有一些拉取请求以使其与谷歌应用引擎兼容,它们被接受并改进。

所以,是的,Restler 应该可以使用 AppEngine。如果您遇到任何问题,您可以随时联系我们!

【讨论】:

  • 我可以请求在这里发布app.yml 文件,以便restler 在GAE 上工作。我无法正确配置 app.yml 以在 google app engine sdk 上工作
猜你喜欢
  • 1970-01-01
  • 2015-02-15
  • 1970-01-01
  • 2020-05-27
  • 2012-10-25
  • 2012-05-08
  • 1970-01-01
  • 1970-01-01
  • 2011-02-12
相关资源
最近更新 更多