tree-sitter highlighting server
README.md

Tree-Sitter Highlight Server #

tshc serves files over HTTP, highlighting the syntax of each file and converting to HTML.

Required env vars #

# IP & port for incoming requests
LISTEN=127.0.0.1:8000

# request paths are relative to this directory
# files outside this directory will not be served
BASE_DIR=/var/www/src

Optional env vars #

# prefix in HTTP path, if serving behind a reverse proxy
HTTP_PREFIX=/tshs

# usual semantics from tracing package
export RUST_LOG=debug

# human-readable logs (default json)
export LOG_FORMAT=pretty