Just to see what it takes to build a HTTP web server and to learn Rust along the way.
Make sure you have cargo
installed and run the command cargo run
to boot up the server.
Visit locahost:8888
from your browser.
-
Say hello world - visit
localhost:8888/hello
-
Serve static files - visit
localhost:8888/files/index.html
- this will serve theindex.html
file from thewww
folder in the repo root. Place any other file insidewww
and they can be served similarly (using the/files
prefix - this will be configurable by the user in future, just like in Apache and Nginx). -
Execute CGI Scripts - place any script inside the
cgi
folder and they can be executed by visitinglocalhost:8888/cgi/script
. This is a very simplistic implementation. Planning to supportSCGI
. Maybe FastCGI in future.
- CGI Scripting
- Reverse Proxy
- Server Configuration with TOML