Skip to content

Usub-development/webserver

Repository files navigation

Webserver

Fast and versatile web framework in modern C++

Webserver is a lightweight, high-performance framework built on top of Uvent.
It provides everything you need to handle HTTP/1.0 and HTTP/1.1 efficiently, with planned support for HTTP/2 and HTTP/3.


Features

  • 🚀 High-performance async event loop (via Uvent)
  • 📦 RFC-compliant HTTP parser
  • 🔌 Middleware and routing system (regex & radix)
  • 🧩 Modular and extensible design
  • 🔒 TLS/SSL support (optional, OpenSSL)

Quick Start

Minimal server:

#include "server/server.h"
#include "Protocols/HTTP/Message.h"

using namespace usub::server;

void handler(protocols::http::Request &req, protocols::http::Response &res) {
    res.setStatus(200).setMessage("OK").setBody("Hello World!\n");
}

int main() {
    Server server("../config/config.toml");
    server.handle({"GET"}, "/hello", handler);
    server.run();
}

Run:

curl http://127.0.0.1:8111/hello

Documentation

Full documentation:


Roadmap

See Roadmap.


Contributing

We welcome contributions! Please see the Contributing Guide.


License

MIT

Releases

No releases published

Packages

No packages published

Languages