[英]ASP.NET Core with React.JS How to open separate Browser for the Backend?
I've created an " ASP.NET core with React.Js " project:我创建了一个“ ASP.NET core with React.Js ”项目:
And when I'm running it, it waits a while then redirects me to the front-end page which makes me not able to have the back-end browser(I need it to play with SwaggerUI and other stuff):当我运行它时,它会等待一段时间然后将我重定向到前端页面,这让我无法使用后端浏览器(我需要它来玩SwaggerUI和其他东西):
The question is: how can I make both browsers open?问题是:如何打开两个浏览器? I mean a browser for the front-end "http://localhost:46432" and one for the back-end as well "https://localhost:7211".
我的意思是前端浏览器“http://localhost:46432”和后端浏览器“https://localhost:7211”。
And thank you in advance.提前谢谢你。
Download NuGet dependecy:下载 NuGet 依赖:
Swashbuckle.AspNetCore
虚张声势.AspNetCore
Adding the following lines to Program.cs:将以下行添加到 Program.cs:
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
...
app.UseSwagger();
app.UseSwaggerUI();
then from the browser call the backend URL+swagger: https://localhost:7211/swagger然后从浏览器调用后端 URL+swagger: https://localhost:7211/swagger
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.