#http-server #http #http-request #serve-static #extend #basic #requests

bin+lib hteapot

HTeaPot is a lightweight HTTP server library designed to be easy to use and extend

5 releases

Uses old Rust 2015

0.2.6 Sep 30, 2024
0.2.5 Jul 6, 2024
0.2.1 Jun 24, 2024
0.2.0 Jun 24, 2024
0.1.0 Jun 6, 2024

#1377 in Web programming

Download history 246/week @ 2024-06-23 96/week @ 2024-06-30 65/week @ 2024-07-07 10/week @ 2024-07-14 29/week @ 2024-07-28 2/week @ 2024-08-04 27/week @ 2024-09-15 11/week @ 2024-09-22 179/week @ 2024-09-29 12/week @ 2024-10-06

229 downloads per month
Used in cafetera

MIT license

37KB
887 lines

HteaPot HTTP Server

Spanish | English

HteaPot is a simple HTTP server written in Rust. It allows you to serve static files and handle basic HTTP requests.

Features

  • Serve static files from a specified root directory
  • Configurable server port and host
  • Basic logging of incoming requests

Usage

  1. Clone the repository:
git clone <repository_url>
  1. Build the project:
cargo build --release

Run the server with a configuration file:

Copy code
./target/release/hteapot <config_file_path>

Configuration

You can configure the server using a TOML file. Here's an example configuration:

[HTEAPOT]
port = 8081 # The port on which the server will listen for incoming connections.
host = "localhost" # The host address to bind the server to. 
root = "public" # The root directory from which to serve files.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

No runtime deps