The goal of this project, the third of the scholar year, is to develop a high-performance software solution that computes the quickest path between two landmarks in the United States. This solution must be implemented in C++ and accessed via a REST API with specific input-output formats.
The project is divided into several directories, each containing a specific part of the project:
Documents/
: Contains all the documents related to the project (Specifications, Reports, etc.);QuickPath/Src/
: Contains the source code of the project;
Warning
The project needs CMake to be built. If you don't have it installed, you can download it here.
First, clone the repository by downloading the ZIP file once you click on the green "Code" button.
Extract it and put the .csv
file in the QuickPath/
directory.
Then, you open a terminal and navigate to the QuickPath/
directory.
mkdir -p build && cd build
cmake ..
make
./QuickPath
The server will start and you can now access the API at http://localhost:18080/
.
We advise you to use Postman to test the API.
Once the server is running, you can access the frontend by opening the index.html
file in your browser.
To get the quickest path between two landmarks, you need to send a GET
request to the /path
endpoint with the following parameters:
source
: The name of the source landmark;destination
: The name of the destination landmark.format
: The format of the response. Can bejson
orxml
. If not specified, the default format isjson
.
Here is an example of a request:
http://localhost:18080/quickestpath?source={source}&destination={destination}(&format={format})
The result will then be displayed in the format you specified.