Skip to content

vitaly-castLabs/httpsrv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpsrv

A simple HTTP(S) server which sucks much less than python3 -m http.server (96k vs 3.5k requests per second with wrk -t4 -c200 -d10s <addr>). Another selling point is an unbearably awesome name.

Based on my fork of tiny but mighty cpp-httplib.

How to build

git clone https://github.com/vitaly-castLabs/httpsrv.git && \
cd httpsrv && \
cmake . && \
cmake --build . --config Release

How to run

cd into the folder you want to serve and run httpsrv [port] [cert] [priv-key] (self-signed certificate and privare key are provided). Some examples:

httpsrv                        - serve http on port 8080
httpsrv 80                     - serve http on port 80 (might require sudo)
httpsrv 8443 cert.pem pkey.pem - serve https on port 8443
httpsrv 8000 --sab             - serve http on port 8000 with SharedArrayBuffer headers

About

Simple HTTP(S) server written in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published