mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-23 09:49:02 +00:00
Use CreateHostBuilder
This commit is contained in:
parent
92f5775389
commit
354abfe79a
1 changed files with 7 additions and 7 deletions
|
@ -11,13 +11,13 @@ namespace ProjectLighthouse {
|
|||
Console.WriteLine("Welcome to Project Lighthouse!");
|
||||
Console.WriteLine(ServerSettings.DbConnected ? "Connected to the database." : "Database unavailable. Starting in stateless mode.");
|
||||
|
||||
IHostBuilder builder = Host.CreateDefaultBuilder(args);
|
||||
|
||||
builder.ConfigureWebHostDefaults(webBuilder => {
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
|
||||
builder.Build().Run();
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder => {
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue