updated to start the webpage at startup

This commit is contained in:
2023-04-08 13:33:16 +03:00
parent 810a527cc1
commit 6124f89cb0

View File

@@ -1,5 +1,8 @@
using System.Diagnostics;
await PluginManager.Config.Initialize(true); await PluginManager.Config.Initialize(true);
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
// Add services to the container. // Add services to the container.
@@ -10,6 +13,11 @@ var app = builder.Build();
// Configure the HTTP request pipeline. // Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment()) if (!app.Environment.IsDevelopment())
{ {
Process.Start(new ProcessStartInfo
{
FileName = "http://localhost:5000",
UseShellExecute = true
});
app.UseExceptionHandler("/Home/Error"); app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts(); app.UseHsts();
@@ -26,4 +34,4 @@ app.MapControllerRoute(
name: "default", name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}"); pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run(); app.Run();