RedHttpServer - write a C# backend server in minutes!
var server = new RedHttpServer(5000);
server.Get("/", (req, res) => res.SendString("Hello world!"));
await server.RunAsync();
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();
Authentication middleware
Rendering plugins