Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

171 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

localhost

A single threaded HTTP server written in Rust as a part of the grit:lab curriculum.

Project description

Features

  • Custom handlers
  • Standard handlers for GET, HEAD, OPTIONS, TRACE, POST, PUT, DELETE & PATCH
  • Support for chunked requests with the Transfer-Encoding header.
  • Support for JavaScript, Python, PHP and Ruby CGI.
  • Sessions
  • Server logs
  • Dynamic default error page

Quick start guide

  1. Install Rust
  2. run cargo run in the root of this directory

The demo configuration will give you these following routes:

  • /api/update-cookie - Handler to update a cookie on the server
  • /api/get-cookie - Handler to get a cookie from the server
  • /api/cookie-demo - Dynamic session demo
  • /cgi - Demo path for implemented CGI
  • /files - Access anything you want in the /files directory. Highly recommend to remove this endpoint in production.
  • /test.txt - Used for testing files on the server
  • /test-dir - Used for testing directories on the server

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages