I've created an "ASP.NET core with React.Js" project :
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):
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".
And thank you in advance.
CodePudding user response:
Download NuGet dependecy:
Swashbuckle.AspNetCore
Adding the following lines to 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