Squirrowse/Squirrowse.Client/Program.cs

28 lines
905 B
C#
Raw Normal View History

2020-06-20 22:02:20 +02:00
using Microsoft.Extensions.DependencyInjection;
2019-10-31 13:08:42 +01:00
using Microsoft.Extensions.Hosting;
2020-06-20 22:02:20 +02:00
namespace squirrowse.client
2019-10-31 10:23:07 +01:00
{
2020-06-20 22:02:20 +02:00
class Program
2019-10-31 10:23:07 +01:00
{
2019-10-31 13:08:42 +01:00
public static void Main(string[] args)
2019-10-31 10:23:07 +01:00
{
2019-10-31 13:08:42 +01:00
CreateHostBuilder(args).Build().Run();
2019-10-31 10:23:07 +01:00
}
2019-10-31 13:08:42 +01:00
2019-11-04 09:29:37 +01:00
public static IHostBuilder CreateHostBuilder(string[] args)
{
return Host.CreateDefaultBuilder(args)
2019-10-31 13:08:42 +01:00
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Worker>();
2020-06-20 22:02:20 +02:00
services.AddSingleton<IConnectionManager>(x =>
new ConnectionManager("http://squirrowse.azurewebsites.net", 80)); //keep as transient for now
// new ConnectionManager("http://192.168.0.13", 5000)); //keep as transient for now
2019-11-04 14:28:45 +01:00
2019-10-31 13:08:42 +01:00
});
2019-11-04 09:29:37 +01:00
}
2020-06-20 22:02:20 +02:00
2019-10-31 10:23:07 +01:00
}
2020-06-20 22:02:20 +02:00
}