A HTTP server written in ✨ C++17 ✨.
Clone to repo
git clone [email protected]:fvan-wij/webserver.git
cd webserver
make
Running the webserver.
./app [CONFIG]
Or via the makefile (this will load test.conf
from the root of the project)
make run
There is a script called monitor_children.sh
to monitor the child procs, you can run it like this
./tests/monitor_children.sh `pidof webserv`
Same script for monitoring the fd
./tests/monitor_fds.sh `pidof webserv`
There are some end-to-end tests written in Python using pytest they are stored in the pytests
directory.
This directory contains some subdirectories (test_<NAME>
), essentially acting as seperate test-environments because they all have their own test.conf
file.
Install the required packages using pip.
pip install -r pytests/requirements.txt
Pytest will automatically look for the pytests
directory.
Running all of the tests.
pytest
To run a specific test directory/file.
pytest [PATH]
Or a specific test function.
pytest -k NAME
flag | description |
---|---|
[PATH] | path to python file containing the tests |
-s | disable output capture |
-k NAME | only run tests which match the given substring |
It is recommeded to archive stale branches instead of deleting them
Archive
git tag archive/<branchname> <branchname>
git push origin archive/<branchname>
git branch -D <branchname>
Restore a branch
git checkout -b <branchname> archive/<branchname>