2023-09-19 14:57:24 +02:00
|
|
|
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
|
|
builder.CreateUmbracoBuilder()
|
|
|
|
|
.AddBackOffice()
|
|
|
|
|
.AddWebsite()
|
2024-08-26 11:21:02 +02:00
|
|
|
#if UseDeliveryApi
|
2023-09-19 14:57:24 +02:00
|
|
|
.AddDeliveryApi()
|
2024-08-26 11:21:02 +02:00
|
|
|
#endif
|
2023-09-19 14:57:24 +02:00
|
|
|
.AddComposers()
|
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
WebApplication app = builder.Build();
|
|
|
|
|
|
|
|
|
|
await app.BootUmbracoAsync();
|
|
|
|
|
|
2024-08-27 11:29:02 +01:00
|
|
|
#if UseHttpsRedirect
|
2023-09-19 14:57:24 +02:00
|
|
|
app.UseHttpsRedirection();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
app.UseUmbraco()
|
|
|
|
|
.WithMiddleware(u =>
|
|
|
|
|
{
|
|
|
|
|
u.UseBackOffice();
|
|
|
|
|
u.UseWebsite();
|
|
|
|
|
})
|
|
|
|
|
.WithEndpoints(u =>
|
2023-01-18 15:02:59 +01:00
|
|
|
{
|
2024-08-26 11:21:02 +02:00
|
|
|
/*#if (UmbracoRelease = 'LTS')
|
|
|
|
|
u.UseInstallerEndpoints();
|
|
|
|
|
#endif */
|
2023-09-19 14:57:24 +02:00
|
|
|
u.UseBackOfficeEndpoints();
|
|
|
|
|
u.UseWebsiteEndpoints();
|
|
|
|
|
});
|
2023-01-18 15:02:59 +01:00
|
|
|
|
2023-09-19 14:57:24 +02:00
|
|
|
await app.RunAsync();
|