A simple HTTP server in Rust

Fast, lightweight, and zero dependencies. Perfect for development and small projects.

hteapot illustration

Features

Fast

Built with Rust for maximum performance and minimal resource usage

Simple

Easy to use with a clean API and minimal configuration required

Zero Dependencies

No external dependencies means smaller binaries and better security

Lightweight but Powerful

hteapot is designed to be minimal yet capable, perfect for development environments and small to medium projects. It's built with performance in mind while maintaining a simple interface.

  • Static file serving
  • Custom routing
  • Simple configuration
Server with teapot illustration

Quick Start

Terminal
# Install hteapot
cargo install hteapot

# Start the server
hteapot config.toml
config.toml
[HTEAPOT]
port = 8081
host = "0.0.0.0"
threads = 4
root = "public"
cache = true
cache_ttl = 36
[proxy]
"/test" = "http://example.com"
main.rs
use hteapot::{HttpStatus, HttpResponse, Hteapot, HttpRequest};

fn main() {
    let server = Hteapot::new("localhost", 8081);
    server.listen(move |req: HttpRequest| {
        // This will be executed for each request
        HttpResponse::new(HttpStatus::IAmATeapot, "Hello, I am HTeaPot", None)
    });
}
}

Ready to get started?

hteapot is open source and free to use. Start building your applications with a simple, fast HTTP server.