Clone the repo and install dependencies using npm:
git clone https://github.com/VROOM-Project/vroom-express.git
cd vroom-express
npm installRun the server using:
npm startProvided everything is fine with your VROOM and OSRM 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.
A bunch of variables can be used to adapt the server behaviour, see
beginning of src/index.js file. This includes options to:
- set a max number of locations in handled queries;
- set the
vroomexec path on the system (if not found inPATH); - set the default wrt the detailed route geometry display;
- set address and port for
osrm-routed; - set directory for
access.logfile;