add README.md

This commit is contained in:
Crispy 2024-05-27 22:17:32 +02:00
parent c7711a0408
commit b2f8b9a195

19
README.md Normal file
View file

@ -0,0 +1,19 @@
# webserver
Simple http server written from scratch with no library depencencies.
## features
- list directory contents
- serve `index.html` for a directory that has such a file
- serve `/path/to/<something>.html` when you request `/path/to/<something>`, making urls a bit nicer
- partial file requests so you can watch large video files without needing to load all of it first
- logs requests to stdout
## usage
```
webserver [127.0.0.1:12345] [/path/to/site/root]
```
Both arguments are optional but you must specify the ip if you specify the path.
The default address is `127.0.0.1:55566` and it will serve the current directory.