Rust HTTP Server
A lightweight, multi-threaded HTTP server using TCP Sockets.
Not ready for production.
Installation
Clone the repo and cd into the repo:
git clone https://github.com/ddimaria/rust-http-server.git
cd rust-http-server
Copy over the example .env file:
cp .env.example .env
Running the Server
To startup the server:
cargo run
To see request and response data in stdout:
RUST_LOG=info cargo run
Tests
Integration tests are in the /src/tests
folder.
Running Tests
To run all of the tests:
cargo test
Docker
To build a Docker image of the application:
docker build -t rust_http_server .
Now you can run the container in port 8000:
docker run -it --rm --env-file=.env.docker -p 8000:8000 --name rust_http_server rust_http_server