A minimal C webserver for macOS with live reload in the browser
- C++ 92.3%
- C 5.3%
- Shell 2.4%
| .gitignore | ||
| build.sh | ||
| file_utils.cpp | ||
| file_utils.h | ||
| LICENSE | ||
| main.cpp | ||
| readme.md | ||
| server.cpp | ||
| server.h | ||
| sse.cpp | ||
| sse.h | ||
dev-serv
A minimal C webserver that uses macOS FSEvents for automatically triggering live reload in the browser (via Server-Sent Events, SSE). Not intended for production; this is strictly for personal experiments, quick local demos, and recreational development.
Requirements
- macOS (required for the
CoreFoundationandCoreServicesframeworks, as well as FSEvents). - A C compiler (e.g.
clangorgccthat supports Apple frameworks). pthreadlibrary (included by default on macOS).
Not Production-Ready
This project is not designed for production:
- No TLS/SSL support
- No advanced security features
- Not performance-tested or benchmarked
- Minimal error handling
Use at your own risk for local or recreational purposes.
Building
-
Make sure you have
clangor another compiler installed (e.g. via Xcode Command Line Tools). -
Run the provided build script:
./build.sh