Exemplo n.º 1
0
        static int Main(string[] args)
        {
            ICommandLineHost host = new CommandLineHostBuilder()
                                    .ConfigureLogging(logging =>
            {
                logging.AddConsole();
            })
                                    .ConfigureAppConfiguration(config =>
            {
                config.AddConsul("ClimateMeter.TestClient");
            })
                                    .UseStartup <Startup>()
                                    .Build();

            return(host.Run(args));
        }
Exemplo n.º 2
0
        static int Main(string[] args)
        {
            ICommandLineHost host = new CommandLineHostBuilder()
                                    .ConfigureAppConfiguration(config =>
            {
                config
                .AddConsul("ClimateMeter.Device")
                .AddEnvironmentVariables("DEVICE_");
            })
                                    .ConfigureLogging(logging =>
            {
                logging.AddConsole();
            })
                                    .UseStartup <Startup>()
                                    .Build();

            return(host.Run(args));
        }