This is a micro service used to find the fastest or eco path between two vertices in a graph.
- Donwload the source, then to install dependencies, type :
npm install
- To run the project use :
npm start
- Open
http://127.0.0.1:3000/api
url in your browser. - You should see
Hello, friend
with a set of sample url to run the service.
-
As a sample you can find the fastest path from vertex id: 1 to vertex id: 4 by typing
http://127.0.0.1:3000/api/graph/findPath?from=1&to=4&by=fast
-
Be careful the service checks the border of the vertex's id and can throw exceptions.
Sample :
- To run the unit tests, type :
npm test
The Github repository has two workflows in "Actions" defined in the
Yaml files in ./github/workflows/
The Manual workflow can be used to run (click on "Run Workflow" button) the unit tests in the Github pipeline. NB : Refresh the HTML page if nothing moves.
The other workflow Node.js CI is used for continuous integration.