tesses-webserver-extras/README.md

1.3 KiB

Tesses.WebServer.Extras

EasyServer Stats

Tesses.WebServer.EasyServer Nuget

Tesses.WebServer Downloads

Swagme Stats

Tesses.WebServer Nuget

Tesses.WebServer Downloads


How to use Easy Server, ex for a static website

using Tesses.WebServer;

StaticServer server=new StaticServer("website");
server.StartServer(4000);

How to use Swagme

using Tesses.WebServer;
using Tesses.WebServer.Swagme;

int value=0;
SwagmeServer svr=new SwagmeServer();
svr.AbsoluteUrl=true;
svr.Add("/Progress",async (e)=>{
    await e.SendJsonAsync(new{Progress=50});
},new SwagmeDocumentation("Description","Extended Description"),group: "Getting Values");
RouteServer rsvr=new RouteServer();
rsvr.Add("/",(e)=>{
    e.SendText("...html...");
});

MountableServer mount =new MountableServer(rsvr);
mount.Mount("/api/",svr);

mount.StartServer(4202);

The frontend for Swagme uses Bootstrap