【发布时间】:2021-01-17 04:58:18
【问题描述】:
我正在查看在 Google Cloud Functions 中运行 .net core api 的测试版。
https://cloud.google.com/functions/docs/quickstart-dotnet
我有一个在 AWS lambda 中运行的 rest api,我计划迁移到 Google Cloud Functions。
我想了解我们是否可以运行具有多个端点(如 api/method1、api/method2 等)(如 lambda)的完整 api,或者现在在谷歌云功能中是否不可能。页面中显示的示例仅侦听单个 url。
我也尝试添加
[FunctionsStartup(typeof(Startup))]
在启动时,我添加了如下所示的控制器,但没有发生到控制器的路由
public override void ConfigureServices(WebHostBuilderContext context, IServiceCollection services)
{
services.AddControllers();
有人可以澄清一下吗?
【问题讨论】:
标签: .net-core google-cloud-functions asp.net-core-3.1