【问题标题】:Can i create an old version of Azure Mobile Web Service我可以创建旧版本的 Azure 移动 Web 服务吗
【发布时间】:2017-05-10 01:09:15
【问题描述】:

我有一些预先存在的 Azure 移动服务,它们是在运行自定义 sql 语句时使用 request.service.mssql.query() 时编写的。然而,从那以后,Azure 更新了他们的移动服务,改为使用req.azureMobile.data.execute()

我需要创建一个连接到另一个数据库的新 Azure 移动服务。这个新服务使用与我已经运行的现有服务非常相似的调用。

我是否可以使用旧方法创建新的 Azure 移动服务?因为如果我必须使用新方法,我将不得不重新编写调用,因为调用很多。

如果我必须使用新方法,有没有一种快速的方法可以将预先存在的调用转换为新方法?

谢谢

【问题讨论】:

  • 您是否尝试创建Azure Mobile Apps(新的 Azure 移动服务),然后使用旧的 Node.js 后端 SDK?
  • 这能让我使用在旧移动服务中编写的代码吗?
  • Azure 移动应用使用此 SDK:azure-mobile-apps-node。也许您可以尝试将这个 SDK 替换为 the old SDK 为您的应用程序。

标签: azure azure-mobile-services


【解决方案1】:

有一个compatibility NPM 允许您的移动服务脚本在移动应用程序中运行。它还需要对 createdAt、updatedAt 和 deleted 列具有不同系统列名的数据库视图。或者,如果您没有使用旧列名的现有移动服务,您可以重命名列(删除 __ 前缀)。

Azure 文档有更完整的page on upgrading your Mobile Service 使用这个 NPM。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-08-03
    • 2016-11-28
    • 1970-01-01
    • 2017-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多