tserve is a tiny http server library, which is at its core a single-threaded epoll event loop. It supports only GET & POST requests, fortunately that's all you need.
I began this project inadvertently while reading the glibc manual on sockets, and experimenting with some of the examples given. I began with select for the blocking mechanism, but switched to epoll later on. I first implemented the very minimum of HTTP parsing and responses and later expanded into responding with files, and last but certainly not least I realized I could convert the simple http server into a library.
I utilize basic linked lists using void pointers for storing the routes and other runtime allocations. the routes are just a struct with a name and a function pointer for the server to call given a matching request.
An example http server using tserve
This is one of the few projects I have made that sprang purely from an academic interest rather than an interest in the outcome, but I am glad for it, since despite its size it taught me a lot, from structuring API to managing memory for a long-running application.