Преглед на файлове

update sample.

undefined
Savorboard преди 7 години
родител
ревизия
6e33a1a7f6
променени са 2 файла, в които са добавени 5 реда и са изтрити 20 реда
  1. +5
    -12
      samples/Sample.RabbitMQ.MySql/Program.cs
  2. +0
    -8
      samples/Sample.RabbitMQ.MySql/Startup.cs

+ 5
- 12
samples/Sample.RabbitMQ.MySql/Program.cs Целия файл

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
@@ -13,20 +14,12 @@ namespace Sample.RabbitMQ.MySql
{
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables("ASPNETCORE_")
.Build();
BuildWebHost(args).Run();
}

var host = new WebHostBuilder()
.UseConfiguration(config)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();

host.Run();
}
}
}

+ 0
- 8
samples/Sample.RabbitMQ.MySql/Startup.cs Целия файл

@@ -20,14 +20,6 @@ namespace Sample.RabbitMQ.MySql
x.UseEntityFramework<AppDbContext>();
x.UseRabbitMQ("localhost");
x.UseDashboard();
x.UseDiscovery(d =>
{
d.DiscoveryServerHostName = "localhost";
d.DiscoveryServerPort = 8500;
d.CurrentNodeHostName = "localhost";
d.CurrentNodePort = 5800;
d.NodeName = "CAP 1号节点";
});
});

services.AddMvc();


Зареждане…
Отказ
Запис