Simple and Light WebServer for .NET
※ README is in progress...
- git
-
clone repository
git clone https://github.com/somehitDev/PlateHTTP.git
-
add projectreference to .csproj of your project
<ItemGroup> <ProjectReference Include="{path of PlateHTTP}/Core/PlateHTTP.csproj" /> <!-- if need extensions --> <ProjectReference Include="{path of PlateHTTP}/Extensions/{name of extensions}.csproj" /> </ItemGroup>
-
- nuget
- in progress ...
using PlateHTTP.Core;
using PlateHTTP.Extensions.Templating;
// create application instance
var app = new WebApplication();
// enable logging(optional)
app.EnableLogging("debug");
// register route points
app.Get("/", async ( request, response ) => {
await response.SendText("Hello, PlateHTTP!");
});
// start server
app.Start();
- output
PlateHTTP::info - Server listening on http://0.0.0.0:8000/
PlateHTTP::info - Press `Ctrl+C` to shutdown server...
PlateHTTP::debug - Endpoint [GET] `/`
- see CHANGELOG