C++17 · HTTP/1.1 · MIT
A small
HTTP server.
Define response fixtures in JSON and serve static files from the same process. Built with C++17, Boost.Asio, and Boost.Beast.
By R. Amogh.
/helloHTTP/1.1hello, Tez
01 / GET STARTED
Run with Docker
Start the development image and check the health endpoint.
Installation guide# Start Tez
docker run --rm --pull=always --name tez \
--read-only --cap-drop=ALL \
--security-opt=no-new-privileges \
-p 127.0.0.1:8080:8080 ramogh2404/tez:main
# In another terminal
curl --fail http://127.0.0.1:8080/health
{"status":"ok"}Stop with Ctrl-C or docker stop tez. main is a mutable development tag. Pin a verified digest for deployments.
02 / USE CASES
Local development
and HTTP internals
Use fixed responses to test a client, serve a frontend locally, or study how a C++ server handles requests.
Test against fixed responses
Keep success and error responses in Git. Make your client handle both before the backend is ready.
GET /fixtures/profile → 200
GET /fixtures/unavailable → 503Build a response Serve static files
Serve a small frontend and its response fixtures from the same origin. Point Tez at an explicit static root.
--static-dir examples/fixtures/staticTry the working example Read the implementation
The architecture guide covers parsing, connection lifetime, routing, and response writes, with links to the source.
accept → parse → dispatch → writeWalk through the internals 03 / IMPLEMENTATION
How requests
are handled
Connection limits
Connection admission has an explicit limit. Each admitted connection gets a session.
HTTP parsing
Beast parses HTTP. Tez validates the target, framing, and request limits.
Route selection
Immutable JSON routes, built-in handlers, or a confined static file reader.
Response writes
The response stays alive until the asynchronous write completes.
Per-session strands keep operations serialized. Persistent connections reuse the session; pipelined responses stay in order.
File reads and logging are synchronous today. The measurement plan records what still needs evidence.
04 / ABOUT
About Tez
Tez is my personal C++ HTTP server project. I use it to work on request parsing, asynchronous I/O, and connection management. The code and engineering notes are available on GitHub.
R. Amogh ramogh.com
CURRENT SUPPORT
Tez is in active development toward 1.1.0. It supports HTTP/1.0 and HTTP/1.1 on Linux and macOS.
TLS, authentication, HTTP/2, HTTP/3, compression, and persistent application storage are outside the current implementation.
Configuration and limitsReport an issue