- Access to a routing engine (OSRM or OpenRouteService)
- VROOM
- Clone the repo
git clone https://github.com/VROOM-Project/vroom-express.git
cd vroom-express
git checkout v0.12.0- Install dependencies using
npm
npm installRun the server using:
npm startHealth check should now return a 200 HTTP status code:
curl -w "%{http_code}" http://localhost:3000/health
200Provided everything is fine with your VROOM and routing setup, you should now be able to run queries like:
curl --header "Content-Type:application/json" --data '{"vehicles":[{"id":0,"start":[2.3526,48.8604],"end":[2.3526,48.8604]}],"jobs":[{"id":0,"location":[2.3691,48.8532]},{"id":1,"location":[2.2911,48.8566]}],"options":{"g":true}}' http://localhost:3000See the API documentation for input syntax.
Adjust config.yml to your needs.
Optionally set VROOM_ROUTER=<router>, router being osrm (default), libosrm, ors or valhalla. Using the environment variable will override the config.yml router setting.
If override is set to true in config.yml, then the vroom command-line parameters -g, -c, -t, -x and -l can be set dynamically per request in order to add detailed route geometry and indicators, run in plan mode, set the number of threads, set the exploration level and limit the solving time.
Set values in the json payload via the options key:
"options": {
"g": true,
"c": true,
"t": 4,
"x": 5,
"l": 10
}