Create HttpServer
+ Added IHttpLogger to as a log provider to log Http events or errors + Added HttpConfiguration to more easily configure the server + WebServer.Test project that will be used to test the server
This commit is contained in:
9
WebServer.Test/Program.cs
Normal file
9
WebServer.Test/Program.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace WebServer.Test {
|
||||
internal class Program {
|
||||
internal static void Main(string[] args) {
|
||||
Console.WriteLine("Hello, World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
1
WebServer.Test/Views/HelloWorld.txt
Normal file
1
WebServer.Test/Views/HelloWorld.txt
Normal file
@@ -0,0 +1 @@
|
||||
Hello World!
|
||||
1
WebServer.Test/Views/Test.cshtml
Normal file
1
WebServer.Test/Views/Test.cshtml
Normal file
@@ -0,0 +1 @@
|
||||
Hello World!
|
||||
31
WebServer.Test/WebServer.Test.csproj
Normal file
31
WebServer.Test/WebServer.Test.csproj
Normal file
@@ -0,0 +1,31 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<PublishAot>true</PublishAot>
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Not entirely sure what this does -->
|
||||
<None Remove="Views\**" />
|
||||
<!-- Remove all Razor pages from being compiled in project -->
|
||||
<Content Remove="Views/**.cshtml" />
|
||||
<!-- Copy everything from views into output directory-->
|
||||
<None Include="Views/**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<!-- Do not compile contents -->
|
||||
<Compile Remove="Views\**" />
|
||||
<!-- But, inlude in Editor -->
|
||||
<Content Include="Views\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WebServer\SimpleWebServer.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user