You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/RequestPlex.UI/Program.cs

42 lines
1.1 KiB

using System;
using Microsoft.Owin.Hosting;
using Mono.Data.Sqlite;
using Nancy.Hosting.Self;
9 years ago
using RequestPlex.Core;
using RequestPlex.Core.SettingModels;
using RequestPlex.Helpers;
using RequestPlex.Store;
using RequestPlex.Store.Repository.NZBDash.DataAccessLayer.Repository;
9 years ago
namespace RequestPlex.UI
{
class Program
{
static void Main(string[] args)
{
var uri = "http://localhost:3579/";
var s = new Setup();
s.SetupDb();
var service = new SettingsServiceV2<RequestPlexSettings>(new JsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
9 years ago
var settings = service.GetSettings();
if (settings != null)
{
uri = $"http://localhost:{settings.Port}";
}
using (WebApp.Start<Startup>(uri))
{
Console.WriteLine("Running on {0}", uri);
Console.WriteLine("Press enter to exit");
Console.ReadLine();
}
}
}
}