A lightweight C99 HTTP/1.1 server.
- Serve a directory
- Watch the served directory and reload the served page on file change
Usage: hotserve [OPTIONS] <DIRECTORY>
A minimal HTTP/1.1 server with development utiliites, such as source file watcher and SSE triggered page reload.
Options:
-watch Reloads the served page when any files in the served directory change
-port <N> Port number to listen at (default: 8080)"
-help Prints this help message
Build only tested on linux. Targets C99 libc with 1993 POSIX extensions.
To build, run ./build.sh
Available arguments for the script (through env vars):
RELEASE: toggles between release and debug builds (default: 0)WERR: enables-Werrorcompiler flag (default: 1)NO_CLR: disables deleting the build directory before building (default: 0)RUN: when enabled, automatically runs the binary with gdb after build (default: 0)ENTRY: build entrypoint - assumes unity build (default: "src/entry_linux_cli.c")OUT_BIN: name of the built binary (default: "out")CC: compiler to be used (default: "clang -DCOMPILER_CLANG")