Skip to content

Commit 43e3968

Browse files
committed
api gateway started
1 parent 328e5d6 commit 43e3968

6 files changed

+106
-4
lines changed

run-aspnetcore-microservices.sln

+14-4
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBusRabbitMQ", "src\Com
2121
EndProject
2222
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Ordering", "Ordering", "{4E0CBAE4-FC9D-4CFA-9BBA-DF50B9EC48A1}"
2323
EndProject
24-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ordering.API", "src\Ordering\Ordering.API\Ordering.API.csproj", "{F3721C94-7623-44FD-97F6-BFE699D466F4}"
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.API", "src\Ordering\Ordering.API\Ordering.API.csproj", "{F3721C94-7623-44FD-97F6-BFE699D466F4}"
2525
EndProject
26-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ordering.Application", "src\Ordering\Ordering.Application\Ordering.Application.csproj", "{77C22EB5-5A4C-4132-97C4-888C2C65B277}"
26+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Application", "src\Ordering\Ordering.Application\Ordering.Application.csproj", "{77C22EB5-5A4C-4132-97C4-888C2C65B277}"
2727
EndProject
28-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ordering.Core", "src\Ordering\Ordering.Core\Ordering.Core.csproj", "{006C8A82-B971-4AD6-8FD4-FF3CDE21E2A1}"
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Core", "src\Ordering\Ordering.Core\Ordering.Core.csproj", "{006C8A82-B971-4AD6-8FD4-FF3CDE21E2A1}"
2929
EndProject
30-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ordering.Infrastructure", "src\Ordering\Ordering.Infrastructure\Ordering.Infrastructure.csproj", "{F8F12D19-E4C1-4018-A947-7FA81DFFD4BC}"
30+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Infrastructure", "src\Ordering\Ordering.Infrastructure\Ordering.Infrastructure.csproj", "{F8F12D19-E4C1-4018-A947-7FA81DFFD4BC}"
31+
EndProject
32+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGateway", "ApiGateway", "{F703CBBB-1C02-46A3-A84F-5D27604F2F61}"
33+
EndProject
34+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shopping.ApiGateway", "src\ApiGateway\Shopping.ApiGateway\Shopping.ApiGateway.csproj", "{CAC61153-D31C-42E6-8C80-8B28D3BED783}"
3135
EndProject
3236
Global
3337
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -67,6 +71,10 @@ Global
6771
{F8F12D19-E4C1-4018-A947-7FA81DFFD4BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
6872
{F8F12D19-E4C1-4018-A947-7FA81DFFD4BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
6973
{F8F12D19-E4C1-4018-A947-7FA81DFFD4BC}.Release|Any CPU.Build.0 = Release|Any CPU
74+
{CAC61153-D31C-42E6-8C80-8B28D3BED783}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
75+
{CAC61153-D31C-42E6-8C80-8B28D3BED783}.Debug|Any CPU.Build.0 = Debug|Any CPU
76+
{CAC61153-D31C-42E6-8C80-8B28D3BED783}.Release|Any CPU.ActiveCfg = Release|Any CPU
77+
{CAC61153-D31C-42E6-8C80-8B28D3BED783}.Release|Any CPU.Build.0 = Release|Any CPU
7078
EndGlobalSection
7179
GlobalSection(SolutionProperties) = preSolution
7280
HideSolutionNode = FALSE
@@ -83,6 +91,8 @@ Global
8391
{77C22EB5-5A4C-4132-97C4-888C2C65B277} = {4E0CBAE4-FC9D-4CFA-9BBA-DF50B9EC48A1}
8492
{006C8A82-B971-4AD6-8FD4-FF3CDE21E2A1} = {4E0CBAE4-FC9D-4CFA-9BBA-DF50B9EC48A1}
8593
{F8F12D19-E4C1-4018-A947-7FA81DFFD4BC} = {4E0CBAE4-FC9D-4CFA-9BBA-DF50B9EC48A1}
94+
{F703CBBB-1C02-46A3-A84F-5D27604F2F61} = {1F32F974-1A66-4887-8DC2-A8BAB3AEE17D}
95+
{CAC61153-D31C-42E6-8C80-8B28D3BED783} = {F703CBBB-1C02-46A3-A84F-5D27604F2F61}
8696
EndGlobalSection
8797
GlobalSection(ExtensibilityGlobals) = postSolution
8898
SolutionGuid = {976E779A-BDC9-44B4-A778-269979171BDE}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Hosting;
6+
using Microsoft.Extensions.Configuration;
7+
using Microsoft.Extensions.Hosting;
8+
using Microsoft.Extensions.Logging;
9+
10+
namespace Shopping.ApiGateway
11+
{
12+
public class Program
13+
{
14+
public static void Main(string[] args)
15+
{
16+
CreateHostBuilder(args).Build().Run();
17+
}
18+
19+
public static IHostBuilder CreateHostBuilder(string[] args) =>
20+
Host.CreateDefaultBuilder(args)
21+
.ConfigureWebHostDefaults(webBuilder =>
22+
{
23+
webBuilder.UseStartup<Startup>();
24+
});
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
</PropertyGroup>
6+
7+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Builder;
6+
using Microsoft.AspNetCore.Hosting;
7+
using Microsoft.AspNetCore.Http;
8+
using Microsoft.Extensions.DependencyInjection;
9+
using Microsoft.Extensions.Hosting;
10+
11+
namespace Shopping.ApiGateway
12+
{
13+
public class Startup
14+
{
15+
// This method gets called by the runtime. Use this method to add services to the container.
16+
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
17+
public void ConfigureServices(IServiceCollection services)
18+
{
19+
}
20+
21+
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
22+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
23+
{
24+
if (env.IsDevelopment())
25+
{
26+
app.UseDeveloperExceptionPage();
27+
}
28+
29+
app.UseRouting();
30+
31+
app.UseEndpoints(endpoints =>
32+
{
33+
endpoints.MapGet("/", async context =>
34+
{
35+
await context.Response.WriteAsync("Hello World!");
36+
});
37+
});
38+
}
39+
}
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft": "Warning",
6+
"Microsoft.Hosting.Lifetime": "Information"
7+
}
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft": "Warning",
6+
"Microsoft.Hosting.Lifetime": "Information"
7+
}
8+
},
9+
"AllowedHosts": "*"
10+
}

0 commit comments

Comments
 (0)