-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove web.config because we don't need IIS support, do not publish appsettings.Development.json.
- Loading branch information
1 parent
a94b582
commit ddcbab3
Showing
5 changed files
with
40 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Hosting; | ||
using System.IO; | ||
using System.Reflection; | ||
using FlaUI.WebDriver; | ||
using Microsoft.OpenApi.Models; | ||
|
||
namespace FlaUI.WebDriver | ||
var builder = WebApplication.CreateBuilder(args); | ||
|
||
builder.Services.AddSingleton<ISessionRepository, SessionRepository>(); | ||
|
||
builder.Services.Configure<RouteOptions>(options => options.LowercaseUrls = true); | ||
builder.Services.AddControllers(options => | ||
options.Filters.Add(new WebDriverResponseExceptionFilter())); | ||
|
||
builder.Services.AddEndpointsApiExplorer(); | ||
builder.Services.AddSwaggerGen(c => | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
CreateHostBuilder(args).Build().Run(); | ||
} | ||
|
||
public static IHostBuilder CreateHostBuilder(string[] args) => | ||
Host.CreateDefaultBuilder(args) | ||
.ConfigureWebHostDefaults(webBuilder => | ||
{ | ||
webBuilder.UseStartup<Startup>(); | ||
}); | ||
} | ||
c.SwaggerDoc("v1", new OpenApiInfo { Title = "FlaUI.WebDriver", Version = "v1" }); | ||
}); | ||
|
||
var app = builder.Build(); | ||
|
||
// Configure the HTTP request pipeline. | ||
if (app.Environment.IsDevelopment()) | ||
{ | ||
app.UseSwagger(); | ||
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "FlaUI.WebDriver v1")); | ||
} | ||
|
||
app.UseAuthorization(); | ||
|
||
app.MapControllers(); | ||
|
||
app.Run(); |
This file was deleted.
Oops, something went wrong.