0

我对 Azure 有点陌生。

问题是我正在开发 Azure Functions,有时我必须在本地工作(代码/测试等),有时在 Azure 上工作。每次切换时,我都必须手动比较和更改应用程序设置。

有什么办法可以避免吗?如果我在本地运行,我可能会在没有手动的情况下从服务器获得最新的东西,当我去服务器时 Azure 可能会知道我的更改?

谢谢

4

1 回答 1

2

是的,使用Azure Functions 核心工具

Usage: func azure functionapp <action> [-/--options]

fetch-app-settings  Retrieve App Settings from your Azure-hosted
                    Function App and store locally Aliases:
                    fetch-app-settings, fetch

Usage: func azure functionapp <action> [-/--options]

publish             Publish the current directory contents to an
                    Azure Function App. Locally deleted files
                    are not removed from destination.

    <FunctionAppName> Function App name

    --publish-local-settings [-i] Updates App Settings for the
                                  function app in Azure during deployment.

    --publish-settings-only [-o]  Only publish settings and skip the
                                  content. Default is prompt.

    --overwrite-settings [-y]     Only to be used in conjunction with -i or -o.
                                  Overwrites AppSettings in Azure with local
                                  value if different. Default is prompt.

如果您有点冒险,还有本地文件的加密 -
运行func settings以获取使用。

于 2018-03-06T01:27:50.253 回答