A C++ synchronous webserver powered by Boost
- Breanna Nery
- Natalie Ethell
- Stephen Link
git clone --recursive https://github.com/UCLA-CS130/Team11.git
- Designed to run best in Ubuntu 14.04
- Boost
sudo apt-get install libboost-all-dev
- Python
integration_test.py
is written for Python 2.7
- Requests module
- Required to run
integration_test.py
pip install requests
- Required to run
- Run
make
to build Serve - Run
./serve [config_file]
to execute Serve.new_config
in our main directory adheres to the config file format specified in the common api
- Don't forget to install the requests module! See the dependencies section above
- Run
make
test. This will execute our unit tests and our integration test
src
: Contains all our source and header files neccessary to build the serverserve_main.cc
: Instatiates theServer
class and initalizes the server. Afterwards, it calls the server'slisten()
functionserver.cc
: Defines the server'sinit()
andlisten()
function. Requests are read in and responses are written out inlisten()
server_config.cc
: Responsible for parsing the config file and creating the RequestHandlers and the map. Also used in routing requests to the correct handler.request.cc
: The high level representation of the request adhering to the common apiresponse.cc
: The high level representation of the response adhering to the common api.request_handlers.cc
: This is where the request handler base class and all derived request handlers are defined.http_constants.h
is our main file for defining all constants used by Serve
test
: Contains all our unit test files and our integration test
- Ensure tabs are represented as spaces and a tab width of 2 is used
- Member variables are defined as
[variable_name]_
- We use Boost Trivial Logging for general debug statements and warning statements. Here is an example of how Boost logging is used.
- Only place library includes in the header file. The source file should only contain includes to its respective header file and
http_constants.h