【问题标题】:Azure cosmos DB Emulator change portAzure cosmos DB 模拟器更改端口
【发布时间】:2021-03-15 19:37:07
【问题描述】:

我是 Azure Cosmos DB 的新手。在端口 8084“https://localhost:8084/_explorer/index.html”上运行的 cosmos DB 模拟器。当我尝试通过 PowerShell 获取 Cosmos DB 上下文信息时,它显示 Cosmos DB BaseUri 端口为 8081“https://localhost:8081/”。如何更改 BaseUri 端口。

【问题讨论】:

    标签: powershell azure-cosmosdb


    【解决方案1】:

    您可以通过从命令行启动模拟器来更改端口。

    Microsoft.Azure.Cosmos.Emulator.exe /Port=<port>
    

    您可以使用各种命令行选项。您可以在此处参考所有这些内容。

    Manage the emulator with command-line syntax

    【讨论】:

      【解决方案2】:

      我能够通过将 localhost 值替换为 EMULATOR_ENDPOINT 的不同端口来解决此问题:Cosmos DB files

      完成后,Cosmos DB 使用新端口启动,我能够将数据写入新 URI

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2022-10-05
        • 1970-01-01
        • 2020-08-06
        • 1970-01-01
        • 2023-01-14
        • 2018-06-14
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多