Red

Logo

RedHttpServer - write a C# backend server in minutes!

View the Project on GitHub RedHttp/Red

Features

Hello world example

var server = new RedHttpServer(5000);
server.Get("/", (req, res) => res.SendString("Hello world!"));
await server.RunAsync();

Authentication example - using Red.CookieSessions middleware

var server = new RedHttpServer(5000);
server.Use(new CookieSessions<MySession>(TimeSpan.FromDays(5)));

server.Get("/friends", Auth, async (req, res) => 
{
  var session = req.GetData<MySession>();
  var friends = await db.FindFriends(session.UserId);
  await res.SendJson(friends);
}
await server.RunAsync();
More documentation here

Find it all at NuGet

RedHttpServer

Authentication middleware

Rendering plugins

Cool projects used

MIT Licensed

So use it for whatever you want to!