ASP.NET Core with React.JS 如何为后端打开单独的浏览器?
ASP.NET Core with React.JS How to open separate Browser for the Backend?
我创建了一个“ASP.NET core with React.Js”项目:
当我 运行 它时,它会等待一段时间然后将我重定向到前端页面,这让我无法使用后端浏览器(我需要它来玩 SwaggerUI 和其他东西):
问题是:
我怎样才能打开两个浏览器?我的意思是前端浏览器“http://localhost:46432”和后端浏览器“https://localhost:7211”。
提前谢谢你。
下载 NuGet 依赖项:
Swashbuckle.AspNetCore
将以下行添加到 Program.cs:
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
...
app.UseSwagger();
app.UseSwaggerUI();
然后从浏览器调用后端URL+swagger: https://localhost:7211/swagger
我创建了一个“ASP.NET core with React.Js”项目:
当我 运行 它时,它会等待一段时间然后将我重定向到前端页面,这让我无法使用后端浏览器(我需要它来玩 SwaggerUI 和其他东西):
问题是: 我怎样才能打开两个浏览器?我的意思是前端浏览器“http://localhost:46432”和后端浏览器“https://localhost:7211”。
提前谢谢你。
下载 NuGet 依赖项:
Swashbuckle.AspNetCore
将以下行添加到 Program.cs:
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
...
app.UseSwagger();
app.UseSwaggerUI();
然后从浏览器调用后端URL+swagger: https://localhost:7211/swagger