Basic HTTP server for local hosting.
Copyright © 2024 Chris Roberts (Krobbizoid).
Holo is a basic HTTP server targeted at serving local files for testing. Unlike a typical HTTP server, Holo is single-threaded and forbids access from non-local requests.
Build Holo with cargo build --release
and move the executable from
target/release/holo(.exe)
to a directory with environment access. After this
you can use Holo from the command line:
holo [OPTIONS]
Holo will serve files from the current working directory at
http://localhost:8080/
until Ctrl+C
is used to exit.
Short | Long | Value | Usage |
---|---|---|---|
-p |
--port |
<PORT> |
TCP port [default: 8080] |
-i |
--coi |
(None) | Enable cross-origin isolation |
-h |
--help |
(None) | Print help |
If the --port
option is not set, the default port of 8080
will be used.
Ports below 1024
are likely to be reserved or require administrator
privileges.
If the --coi
flag is set, additional HTTP headers will be served to enable
cross-origin isolation. Cross-origin isolation may not function correctly on
local servers in some browsers.
If the --help
flag is set, Holo will print help information but not perform
any action.
Holo uses the following libraries:
- clap - Command line argument parsing.
- new_mime_guess - MIME type inference.
- percent-encoding - Request URL decoding.
Holo is released under the MIT License:
https://krobbi.github.io/license/2024/mit.txt
See LICENSE.txt for a full copy of the license text.