Skip to content

Out of the box Node-express server to use VROOM as a web API.

License

Notifications You must be signed in to change notification settings

groupnet/vroom-express

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Setup

Clone the repo and install dependencies using npm:

git clone https://github.com/VROOM-Project/vroom-express.git
cd vroom-express
npm install

Requirements

  • OSRM v5.0.0 or later.
  • VROOM v1.0.0 or later

Usage

Run the server using:

npm start

Provided 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:3000

See the API documentation for input syntax.

Customization

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 vroom exec path on the system (if not found in PATH);
  • set the default wrt the detailed route geometry display;
  • set address and port for osrm-routed;
  • set directory for access.log file;

About

Out of the box Node-express server to use VROOM as a web API.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%