Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 767 Bytes

File metadata and controls

37 lines (29 loc) · 767 Bytes

Minimal C++ HTTP Server

A simple HTTP server built using only C++

Features

  • Listens for HTTP connections on a configurable port
  • Handles basic HTTP GET requests (returns "Hello, World!" for /)
  • Minimal, clean, and easy to understand
  • Good starting point to learn how HTTP works at a low level

Folder Structure

├── src/
│   ├── main.cpp
│   ├── http_server.cpp
│   └── http_server.h

Run

  1. Clone the repo (or copy these files into your Codespace).
  2. Build:
    mkdir build && cd build
    cmake ..
    make
  3. Run:
    ./cpp-http-server
  4. Test:
    Open your browser to http://localhost:9000 and you should see "Hello, World!".