A minimal C webserver for macOS with live reload in the browser
  • C++ 92.3%
  • C 5.3%
  • Shell 2.4%
Find a file
2025-02-06 16:59:54 +03:00
.gitignore add project to repo 2025-02-04 20:56:17 +03:00
build.sh add project to repo 2025-02-04 20:56:17 +03:00
file_utils.cpp add support for wasm 2025-02-06 16:59:31 +03:00
file_utils.h add project to repo 2025-02-04 20:56:17 +03:00
LICENSE create LICENSE 2025-02-04 21:06:29 +03:00
main.cpp add project to repo 2025-02-04 20:56:17 +03:00
readme.md add readme 2025-02-04 21:02:21 +03:00
server.cpp add support for wasm 2025-02-06 16:59:31 +03:00
server.h add project to repo 2025-02-04 20:56:17 +03:00
sse.cpp add project to repo 2025-02-04 20:56:17 +03:00
sse.h add project to repo 2025-02-04 20:56:17 +03:00

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 CoreFoundation and CoreServices frameworks, as well as FSEvents).
  • A C compiler (e.g. clang or gcc that supports Apple frameworks).
  • pthread library (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

  1. Make sure you have clang or another compiler installed (e.g. via Xcode Command Line Tools).

  2. Run the provided build script:

    ./build.sh