Fast, unopinionated, minimalist web framework for .NET core.
public static void Main(string[] args)
{
var app = new VulpixServer();
app.AddRoute("GET","/", async (Req req, Res res)=>{
await res.Send("Hello World");
});
app.Listen(8080);
}
We are on NuGet.
- Middleware based
- Async everywhere
- Focus on high performance
- Robust and simple routing
- Use your template engine
- Middleware based
- Executable for generating applications quickly
If you don't have .NET core, please install it before.
Add VulpixServer
as dependency
$ Install-Package VulpixServer
Restore dependencies
$ cd Vulpix
$ dotnet restore
Add simple hello world as bellow:
public class Program
{
public static void Main(string[] args)
{
var app = new VulpixServer();
var foo = new MyController();
app.AddRoute("GET", "/", foo.Index);
app.Use(new BodyParser().Exec);
app.Listen(5000);
}
public class MyController
{
public async void Index(Req req, Res res)
{
await res.Send("Hello world!");
}
}
}
Start the server:
$ dotnet run
And you have a Hello World webserver listen port 5000
The Vulpix philosophy is to provide small, robust tooling for HTTP servers, making it a great solution for single page applications, web sites, hybrids, or public HTTP APIs.