WebServ

A High-Performance C++20 Web Server

Built from scratch with modern C++, featuring epoll-based event handling, HTTP/1.1 compliance, and robust configuration management.

main.cpp

#include <webserv/server/Server.hpp>
#include <webserv/config/ConfigManager.hpp>

int main(int argc, char** argv) {
    try {
        ConfigManager& config = 
            ConfigManager::getInstance();
        config.init(argv[1]);
        
        Server server(config);
        server.start();
    } catch (const std::exception& e) {
        Log::error(e.what());
        return 1;
    }
    return 0;
}
                            

Key Features

High Performance

Epoll-based event handling for thousands of concurrent connections with minimal resource usage.

🔧

Modern C++20

Built with modern C++20 features including ranges, concepts, and smart pointers for memory safety.

📋

HTTP/1.1 Compliant

Full HTTP/1.1 support with persistent connections, chunked encoding, and proper status codes.

⚙️

Flexible Configuration

Nginx-style configuration with virtual hosts, location blocks, and directory-specific settings.

🛡️

Robust Error Handling

Comprehensive error handling with custom error pages and graceful failure recovery.

🔍

Advanced Logging

Multi-level logging system with file and console output for debugging and monitoring.

Documentation

Getting Started

Quick setup guide to get WebServ running on your system.

Read More →

Configuration

Complete configuration reference with examples and best practices.

Read More →

API Reference

Detailed API documentation for all classes and methods.

Read More →

Live Demo

Test WebServ Features

Output:

Click a button above to test WebServ features!
10,000+
Concurrent Connections
<1ms
Response Time
99.9%
Uptime
C++20
Modern Standard