commit 68d7a219d4752861624040a5f1bb947a38f5222d
Author: Vojtěch Bartička <aitakaitov@gmail.com>
Date:   Wed Mar 16 13:34:24 2022 +0100

    Created backend project, logging setup done

diff --git a/Backend/.dockerignore b/Backend/.dockerignore
new file mode 100644
index 0000000..3729ff0
--- /dev/null
+++ b/Backend/.dockerignore
@@ -0,0 +1,25 @@
+**/.classpath
+**/.dockerignore
+**/.env
+**/.git
+**/.gitignore
+**/.project
+**/.settings
+**/.toolstarget
+**/.vs
+**/.vscode
+**/*.*proj.user
+**/*.dbmdl
+**/*.jfm
+**/azds.yaml
+**/bin
+**/charts
+**/docker-compose*
+**/Dockerfile*
+**/node_modules
+**/npm-debug.log
+**/obj
+**/secrets.dev.yaml
+**/values.dev.yaml
+LICENSE
+README.md
\ No newline at end of file
diff --git a/Backend/Backend.sln b/Backend/Backend.sln
new file mode 100644
index 0000000..9c0ece7
--- /dev/null
+++ b/Backend/Backend.sln
@@ -0,0 +1,25 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.1.32228.430
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Backend", "Backend\Backend.csproj", "{31E7A829-3F1D-41F6-B189-86449966E060}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{31E7A829-3F1D-41F6-B189-86449966E060}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{31E7A829-3F1D-41F6-B189-86449966E060}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{31E7A829-3F1D-41F6-B189-86449966E060}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{31E7A829-3F1D-41F6-B189-86449966E060}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {5324355B-DC27-4187-9788-968039764275}
+	EndGlobalSection
+EndGlobal
diff --git a/Backend/Backend/Backend.csproj b/Backend/Backend/Backend.csproj
new file mode 100644
index 0000000..35f72bf
--- /dev/null
+++ b/Backend/Backend/Backend.csproj
@@ -0,0 +1,19 @@
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+  <PropertyGroup>
+    <TargetFramework>net6.0</TargetFramework>
+    <Nullable>enable</Nullable>
+    <ImplicitUsings>enable</ImplicitUsings>
+    <UserSecretsId>092a92d3-0425-42b0-aa80-0cbbb950a8e8</UserSecretsId>
+    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
+    <PackageReference Include="Serilog" Version="2.10.0" />
+    <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
+    <PackageReference Include="Serilog.Sinks.Seq" Version="5.1.1" />
+    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
+  </ItemGroup>
+
+</Project>
diff --git a/Backend/Backend/Controllers/WeatherForecastController.cs b/Backend/Backend/Controllers/WeatherForecastController.cs
new file mode 100644
index 0000000..b643059
--- /dev/null
+++ b/Backend/Backend/Controllers/WeatherForecastController.cs
@@ -0,0 +1,33 @@
+using Microsoft.AspNetCore.Mvc;
+
+namespace Backend.Controllers
+{
+    [ApiController]
+    [Route("[controller]")]
+    public class WeatherForecastController : ControllerBase
+    {
+        private static readonly string[] Summaries = new[]
+        {
+        "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
+    };
+
+        private readonly ILogger<WeatherForecastController> _logger;
+
+        public WeatherForecastController(ILogger<WeatherForecastController> logger)
+        {
+            _logger = logger;
+        }
+
+        [HttpGet(Name = "GetWeatherForecast")]
+        public IEnumerable<WeatherForecast> Get()
+        {
+            return Enumerable.Range(1, 5).Select(index => new WeatherForecast
+            {
+                Date = DateTime.Now.AddDays(index),
+                TemperatureC = Random.Shared.Next(-20, 55),
+                Summary = Summaries[Random.Shared.Next(Summaries.Length)]
+            })
+            .ToArray();
+        }
+    }
+}
\ No newline at end of file
diff --git a/Backend/Backend/Dockerfile b/Backend/Backend/Dockerfile
new file mode 100644
index 0000000..c90383c
--- /dev/null
+++ b/Backend/Backend/Dockerfile
@@ -0,0 +1,22 @@
+#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
+
+FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
+WORKDIR /app
+EXPOSE 80
+EXPOSE 443
+
+FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
+WORKDIR /src
+COPY ["Backend/Backend.csproj", "Backend/"]
+RUN dotnet restore "Backend/Backend.csproj"
+COPY . .
+WORKDIR "/src/Backend"
+RUN dotnet build "Backend.csproj" -c Release -o /app/build
+
+FROM build AS publish
+RUN dotnet publish "Backend.csproj" -c Release -o /app/publish
+
+FROM base AS final
+WORKDIR /app
+COPY --from=publish /app/publish .
+ENTRYPOINT ["dotnet", "Backend.dll"]
\ No newline at end of file
diff --git a/Backend/Backend/Program.cs b/Backend/Backend/Program.cs
new file mode 100644
index 0000000..5873bbe
--- /dev/null
+++ b/Backend/Backend/Program.cs
@@ -0,0 +1,32 @@
+using Serilog;
+
+var builder = WebApplication.CreateBuilder(args);
+
+// Logging
+builder.Host.UseSerilog((ctx, lc) => lc.WriteTo.Console());
+
+builder.Services.AddControllers();
+
+// Swagger
+builder.Services.AddEndpointsApiExplorer();
+builder.Services.AddSwaggerGen();
+
+var app = builder.Build();
+
+// Configure the HTTP request pipeline.
+if (app.Environment.IsDevelopment())
+{
+    app.UseSwagger();
+    app.UseSwaggerUI();
+}
+
+app.UseHttpsRedirection();
+app.UseAuthorization();
+
+app.MapControllers();
+
+// Logging
+app.UseSerilogRequestLogging();
+app.Logger.LogInformation("Starting up");
+
+app.Run();
diff --git a/Backend/Backend/Properties/launchSettings.json b/Backend/Backend/Properties/launchSettings.json
new file mode 100644
index 0000000..38bbb3b
--- /dev/null
+++ b/Backend/Backend/Properties/launchSettings.json
@@ -0,0 +1,38 @@
+{
+  "$schema": "https://json.schemastore.org/launchsettings.json",
+  "iisSettings": {
+    "windowsAuthentication": false,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://localhost:53037",
+      "sslPort": 44379
+    }
+  },
+  "profiles": {
+    "Backend": {
+      "commandName": "Project",
+      "launchBrowser": true,
+      "launchUrl": "swagger",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      },
+      "applicationUrl": "https://localhost:7241;http://localhost:5241",
+      "dotnetRunMessages": true
+    },
+    "IIS Express": {
+      "commandName": "IISExpress",
+      "launchBrowser": true,
+      "launchUrl": "swagger",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    },
+    "Docker": {
+      "commandName": "Docker",
+      "launchBrowser": true,
+      "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
+      "publishAllPorts": true,
+      "useSSL": true
+    }
+  }
+}
\ No newline at end of file
diff --git a/Backend/Backend/WeatherForecast.cs b/Backend/Backend/WeatherForecast.cs
new file mode 100644
index 0000000..eadd83e
--- /dev/null
+++ b/Backend/Backend/WeatherForecast.cs
@@ -0,0 +1,13 @@
+namespace Backend
+{
+    public class WeatherForecast
+    {
+        public DateTime Date { get; set; }
+
+        public int TemperatureC { get; set; }
+
+        public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
+
+        public string? Summary { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/Backend/Backend/appsettings.Development.json b/Backend/Backend/appsettings.Development.json
new file mode 100644
index 0000000..0c208ae
--- /dev/null
+++ b/Backend/Backend/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft.AspNetCore": "Warning"
+    }
+  }
+}
diff --git a/Backend/Backend/appsettings.json b/Backend/Backend/appsettings.json
new file mode 100644
index 0000000..10f68b8
--- /dev/null
+++ b/Backend/Backend/appsettings.json
@@ -0,0 +1,9 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft.AspNetCore": "Warning"
+    }
+  },
+  "AllowedHosts": "*"
+}
