Skip to content

maciek-codes/Conpanna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Conpanna

Simple HTTP server framework, written in C#. Inspired by Express.

Espresso con panna is also Italian for coffee with cream.

NOTE: it is a project built for learning and fun, not with intention to use in production (yet).

Example

To you can create a simple server with Conpanna in just a few lines of code:

public class Program {
    static void Main(string[] args) {
        using (var app = new Conpanna()) {
            app.Get("/hello", (req, res) => res.Send("Hello World!"));
            app.Listen("localhost", 8080, () => Console.WriteLine("Listening on http://localhost:8080"));
            System.Console.ReadLine();
        }
    }
}

This server would respond to GET request on http://localhost:8000/ with 'Hello World!' string.

Dependencies

Project depends on Moq for mocking, SimpleInjector for dependency injection and Xunit for unit testing.

TODO

There are a few more things I would like to add:

  • Middleware support, e.g. app.use(...)
  • A few built in middlewares
  • JSON support
  • Implement missing feature from Request and Response classes, e.g. JSON support
  • Test on Linux and MacOs with CoreCLR

Contributing

Issues, PRs, suggestions always welcome.

About

Conpanna is a HTTP server framework in C#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages