﻿using Nancy.Owin;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;

namespace VeryWow.SuchTasker.Server
{
	class Program
	{
		static void Main(string[] args)
		{
			new WebHostBuilder()	//TODO - more configurations!
				.UseContentRoot(Config.ParseRoot(args))
				.UseKestrel()
				.UseUrls(Config.ParseUrls(args))
				.Configure(a => a.UseOwin(b => b.UseNancy()))
				.Build()
				.Run();
		}
	}
}
