Build.zig webserver?

Adding a basic static web server to replace my docker+python requirement turned out to be simple with GitHub - andrewrk/StaticHttpFileServer: Zig module for serving a directory of files from memory via HTTP

This thread mentions watchexec Zig watch similar to cargo watch - #3 by andrewrk

Combining them both for my project:

watchexec -r --stop-signal SIGKILL -e zig,html,css,zon -w src 'zig build && zig build serve -- zig-out -p 8000'

6 Likes