Red

Logo

RedHttpServer - write a C# backend server in minutes!

View the Project on GitHub rosenbjerg/Red

Features

Hello world example

var server = new RedHttpServer(5000);
server.Get("/", async (req, res) => await 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.GetSession<MySession>();
  var friends = await db.FindFriends(session.Username);
  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!