A simple single-threaded HTTP server implemented in C using epoll (Linux) or select for I/O multiplexing.
0.0.1
make
./moni # Default port 8080
./moni -p 9000 # Custom port
./moni -f /path/to/file # Set file path to check
MONI_PATH=/path/to/file ./moni # Via environment variable
./moni -s # Use select instead of epoll
./moni -v # Enable verbose logging (request/response)
| Endpoint | Description |
|---|---|
/version | Returns server version (0.0.1) |
/hostname | Returns machine hostname |
/file | Returns 1 if file exists, 0 if not (other URLs also work) |
-p PORT - Port number (default: 8080)-f PATH - File path to check for existence-s - Use select instead of epoll-v - Enable verbose logging (print all request/response to console)-h - Show helpmake test