1
0
mirror of https://github.com/bitwarden/server synced 2025-12-13 06:43:45 +00:00

create kestrel server for serving static files

This commit is contained in:
Kyle Spearrin
2017-08-15 12:03:55 -04:00
parent a9b9094b9c
commit 71c4954ca8
13 changed files with 109 additions and 5 deletions

27
util/Server/Program.cs Normal file
View File

@@ -0,0 +1,27 @@
using Microsoft.AspNetCore.Hosting;
namespace Server
{
public class Program
{
public static void Main(string[] args)
{
var builder = new WebHostBuilder()
.UseKestrel()
.UseStartup<Startup>();
if(args.Length > 0)
{
builder.UseContentRoot(args[0]);
}
if(args.Length > 1)
{
builder.UseWebRoot(args[1]);
}
var host = builder.Build();
host.Run();
}
}
}