Skip to content

Very tiny web server written in Rust. Available for Linux only.

License

Notifications You must be signed in to change notification settings

albertayler/Tinyserve

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tinyserve

Build status dependency status

Tinyserve is a simple multi-threaded web server written in Rust. It serves the specified web root at the specified address.

USAGE:
    tinyserve [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -v               Use -v for verbose output.
    -V, --version    Prints version information

OPTIONS:
    -a, --address <127.0.0.1>              Sets the IPv4 address to bind to. Default is 127.0.0.1 or localhost.
    -p, --port <8000>                      Sets the port on the specified address. Default is 8000.
    -r, --webroot <directory_with_html>    Sets the web root for the server. index.html is loaded from this directory.
                                           Default is ~/.config/tinyserve.

How to use

Your web root directory must contain at the very least, a file called 404.html. Tinyserve will crash if this file is not present. If there is no index.html to serve for a GET / request, Tinyserve will fall back to 404.html.

There is an example HTML site included with this repo, copy it to your ~/.config/tinyserve, the default web root, and give it a try. The default address is localhost:8000.

License

This software is licensed under the terms of the MIT License. This software is distributed with absolutely no warranty.

About

Very tiny web server written in Rust. Available for Linux only.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 73.9%
  • HTML 13.5%
  • CSS 11.7%
  • JavaScript 0.9%