1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-08 06:28:14 -05:00

some cleanup

This commit is contained in:
Kyle Spearrin 2017-10-09 14:05:35 -04:00
parent c52add4051
commit fc3425dfb7
2 changed files with 6 additions and 16 deletions

View File

@ -1,12 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore; using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Bit.Icons namespace Bit.Icons
{ {
@ -14,12 +8,11 @@ namespace Bit.Icons
{ {
public static void Main(string[] args) public static void Main(string[] args)
{ {
BuildWebHost(args).Run(); WebHost
} .CreateDefaultBuilder(args)
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>() .UseStartup<Startup>()
.Build(); .Build()
.Run();
}
} }
} }

View File

@ -17,12 +17,8 @@ namespace Bit.Icons
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
// Options
services.AddOptions(); services.AddOptions();
// Settings
services.Configure<IconsSettings>(Configuration.GetSection("IconsSettings")); services.Configure<IconsSettings>(Configuration.GetSection("IconsSettings"));
services.AddMemoryCache(); services.AddMemoryCache();
services.AddMvc(); services.AddMvc();
} }
@ -33,6 +29,7 @@ namespace Bit.Icons
{ {
app.UseDeveloperExceptionPage(); app.UseDeveloperExceptionPage();
} }
app.UseMvc(); app.UseMvc();
} }
} }