Hserv is a simple but flexible HTTP server that serves as the server companion to utilities such as Wget and Curl. The core of the application is a single header implementation of an HTTP/1.1 server that supports both unsecure and secure socket communication using OpenSSL. The server has a simple, yet flexible, method and transfer-encoding agnostic API.
- OpenSSL
cd hserv
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/home/user/.local ..
make install
-
Serve a directory on any interface, port 8080:
hserv
-
Serve a single file on any interface, port 9090:
hserv -p 9090
-
Serve data from stdin on localhost:
echo Hello World | hserv -b 127.0.0.1
-
Securely serve a single file from a directory and immediately exit:
hserv -s -x
This project is licensed under the MIT License. See the LICENSE file for details.