Skip to content

trevor-atlas/http-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

http-server

A simple http server, in Rust ๐Ÿฆ€

This was a self-learning project I did over a weekend. Do not use it in production! ๐Ÿ˜Š

Inside you will find a single threaded TCP based HTTP server which supports:

  • parsing simple HTTP/1.1 requests, including
    • path and query string
    • headers
    • no real BODY support ๐Ÿค”
  • support for serving static files from a public directory, including html and css

I learned a lot implementing this, including:

  • how to make and expose different packages
  • lifetimes 'buf
  • macros and compiler flags
  • rust flavor of enums and pattern matching
  • How to implement different traits, such as Display
  • Various methods for handling different Result and Option outcomes.

Feel free to use any of this code for whatever you like!

About

A simple http server, in rust ๐Ÿฆ€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published