Projekt Systementwicklung (Sommersemester 2024) - FH Münster
This repository's contents is divided across following primary sections:
/assets
contains assets used for general purposes/build
contains compiled files generated by cmake/git-hooks
contains git hooks. (Installed using ./scripts/install-git-hooks.sh)/lib
contains third-party & own libraries used in the project/scripts
contains scripts used for general purposes/src
contains the source code for the project/src/htdocs
represents the root directory of the server/tests
contains the test code for the project
file_lib
is a library that provides functions for file handlingstring_lib
is a library that provides functions for string handlingtesting
is a library that provides functions for testing
http_models
is a module that provides models for HTTP requests and responseshttp_parser
is a module that provides a parser for HTTP requests and urlshttp_router
is a module that provides a router for HTTP requestshttp_server
is a module that provides a basic HTTP server
Clone the repository
$ git clone https://github.com/fh-dualies/http-c-erver.git
Switch to "http-c-erver" folder
$ cd http-c-erver
Init using cmake
$ cmake .
Compile http-c-erver
$ make
The http server can be configured by changing the values in the main.h
file. These are only general configurations.
For more specific configurations, the server itself must be modified (look for constants in *.h
files).
The http server will process the request information and send a response back to the client.
$ ./build/server.out
$ ./build/tests.out
Note that python3 is required to run the tests.
$ pyhton3 tests/http/tests.py
Red: Assertion failed
Green: Assertion passed
This project uses clang-format to enforce a consistent code style. To format your code, run the following command:
./scripts/format.sh
This project uses Conventional Commits to enforce a consistent commit message style.
This might help to write better commit messages: Commitlint.io