Skip to content

Commit

Permalink
[APIGateway] Created Project & Added Logging Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hidayatarg committed Oct 7, 2023
1 parent 692068a commit 953b663
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/ApiGateways/OcelotApiGw/OcelotApiGw.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

</Project>
12 changes: 12 additions & 0 deletions src/ApiGateways/OcelotApiGw/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var builder = WebApplication.CreateBuilder(args);

// logging configuration
builder.Logging.AddConfiguration(builder.Configuration.GetSection("Logging"));
builder.Logging.AddConsole();
builder.Logging.AddDebug();

var app = builder.Build();

app.MapGet("/", () => "Hello World!");

app.Run();
28 changes: 28 additions & 0 deletions src/ApiGateways/OcelotApiGw/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:54191",
"sslPort": 0
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5183",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
9 changes: 9 additions & 0 deletions src/ApiGateways/OcelotApiGw/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
10 changes: 10 additions & 0 deletions src/ApiGateways/OcelotApiGw/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
15 changes: 12 additions & 3 deletions src/aspnetrun-microservices.sln
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.API", "Services\Or
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Domain", "Services\Ordering\Ordering.Domain\Ordering.Domain.csproj", "{96EB91C7-AEDA-4299-8D1B-D644BD0B9758}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ordering.Application", "Services\Ordering\Ordering.Application\Ordering.Application.csproj", "{C9ADE6F2-A129-43EA-9797-9AED53A2E2C9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Application", "Services\Ordering\Ordering.Application\Ordering.Application.csproj", "{C9ADE6F2-A129-43EA-9797-9AED53A2E2C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ordering.Infrastructure", "Services\Ordering\Ordering.Infrastructure\Ordering.Infrastructure.csproj", "{353991FA-0C86-4B2E-ABA4-A485C0067058}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Infrastructure", "Services\Ordering\Ordering.Infrastructure\Ordering.Infrastructure.csproj", "{353991FA-0C86-4B2E-ABA4-A485C0067058}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BuildingBlocks", "BuildingBlocks", "{BCFBA318-9479-49FD-AEE6-3982B364E2B8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventBus.Messages", "BuildingBlocks\EventBus.Messages\EventBus.Messages.csproj", "{624E551A-CEF9-49D7-B9AA-6CDE84F37EF1}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus.Messages", "BuildingBlocks\EventBus.Messages\EventBus.Messages.csproj", "{624E551A-CEF9-49D7-B9AA-6CDE84F37EF1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OcelotApiGw", "ApiGateways\OcelotApiGw\OcelotApiGw.csproj", "{6CB40843-B6AA-46BC-A653-3C7B3C7A1FFC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGateways", "ApiGateways", "{B2194AFD-4449-4D18-8AA6-34AC0FBBC675}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -80,6 +84,10 @@ Global
{624E551A-CEF9-49D7-B9AA-6CDE84F37EF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{624E551A-CEF9-49D7-B9AA-6CDE84F37EF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{624E551A-CEF9-49D7-B9AA-6CDE84F37EF1}.Release|Any CPU.Build.0 = Release|Any CPU
{6CB40843-B6AA-46BC-A653-3C7B3C7A1FFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CB40843-B6AA-46BC-A653-3C7B3C7A1FFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CB40843-B6AA-46BC-A653-3C7B3C7A1FFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CB40843-B6AA-46BC-A653-3C7B3C7A1FFC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -98,6 +106,7 @@ Global
{C9ADE6F2-A129-43EA-9797-9AED53A2E2C9} = {80B47DA9-1901-4C8F-916A-BEF2E2657AEE}
{353991FA-0C86-4B2E-ABA4-A485C0067058} = {80B47DA9-1901-4C8F-916A-BEF2E2657AEE}
{624E551A-CEF9-49D7-B9AA-6CDE84F37EF1} = {BCFBA318-9479-49FD-AEE6-3982B364E2B8}
{6CB40843-B6AA-46BC-A653-3C7B3C7A1FFC} = {B2194AFD-4449-4D18-8AA6-34AC0FBBC675}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AAE004AE-7A21-4E88-B671-0BB28986C5DD}
Expand Down

0 comments on commit 953b663

Please sign in to comment.