giuliano-macedo / http-server-from-scratch-rs

A zero dependency multi-threaded HTTP server made from scratch with headers and some file extensions support in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP Server from scratch in Rust

This project is a zero dependency multi-threaded HTTP server made from scratch with headers and some file extensions support in Rust. I wrote this code to assit my understanding in Rust and the HTTP protocol, it was inspired by the lessons in the udemy course made by Lyubomir Gavadinov.

Note: This implementation is not meant to be deployed in a production environment.

Pre-requirements

  • Cargo

Running

Just use the following command in the root of the repo to run in http://0.0.0.0:1234 with 32 threads:

cargo run 1234 32

and then access http://0.0.0.0:1234 to be redirected to index.html.

About

A zero dependency multi-threaded HTTP server made from scratch with headers and some file extensions support in Rust


Languages

Language:Rust 88.8%Language:HTML 4.5%Language:CSS 3.9%Language:JavaScript 2.8%