A minimalistic and fast http server, built in c++ and on boost library.
- cmake version >= 3.3
- boost version >= 1.74.0
- GCC version >= 4.7
- MSVC version >= 14.0
git clone https://github.com/bigvzhang/vhttp.git
cd ${TheRepsitory}
mkdir build
cd build
3.1 For windows, specify option -A with x64 to create a x64 solution or Win32 to create a Win32 solution. Then use msbuild to build the solution. For example:
REM if cmake fails to search boost dir, please set the following variables
REM SET BOOST_INCLUDEDIR={boost header dir}
REM SET BOOST_LIBRARYDIR={boost library dir}
REM SET PATH=%PATH%;{PATH_TO_CMAKE}
REM SETUP VC Enviroment, like:
REM "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
REM create solution
cmake ..\cmake -A x64
REM Build
MSBuild vhttp.sln /p:Configuration=Release;Platform=x64
#if cmake fails to search boost dir, please set the following variable
#export BOOST_ROOT={boost install dir}
cmake ../cmake
make
Usage: vhttp <address> <port> <doc_root> <threads>
Example:
vhttp 0.0.0.0 8080 . 1
File | Description |
---|---|
src_cpp/main.cpp | create server |
src_cpp/range_file_body.hpp | functions to create range file body |
src_cpp/vhttp_funcs.h | functions to parse http requests |
src_cpp/vhttp_funcs.cpp | |
src_cpp/virya_common.h | functions to operate io, strings & etc |
src_cpp/vhttp_common.h | |
src_cpp/virya_common.cpp | |
cmake/CMakeLists.txt | cmake file |
LICENSE.txt | |
README.md |