Coder Social home page Coder Social logo

renovate-bot / vroom-express Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 91ch/vroom-express

0.0 1.0 0.0 114 KB

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

License: BSD 2-Clause "Simplified" License

JavaScript 100.00%

vroom-express's Introduction

Requirements

Setup

  • Clone the repo
git clone https://github.com/VROOM-Project/vroom-express.git
cd vroom-express
git checkout v0.10.0
  • Install dependencies using npm
npm install

Usage

Run the server using:

npm start

Health check should now return a 200 HTTP status code:

curl -w "%{http_code}" http://localhost:3000/health
200

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

See the API documentation for input syntax.

Customization

Server side

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.

Client side

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
}

vroom-express's People

Contributors

groupnet avatar hklarner avatar jcoupey avatar jimmywarting avatar nilsnolde avatar senseikaii avatar sfendrich avatar stefanocudini avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.