Compare commits

...

3 Commits

Author SHA1 Message Date
Patrick Niklaus 56bcb491d3 Bump package version to latest.6 2017-04-07 10:08:36 +00:00
Patrick Niklaus f4e2bd848d Fixed breaking publishing due to node-cmake upgrade 2017-04-07 08:54:52 +00:00
Daniel J. Hofmann 0cf96314a3 Documents frontend quick start in Readme 2017-04-07 06:56:01 +00:00
2 changed files with 22 additions and 14 deletions
+20 -12
View File
@@ -37,27 +37,35 @@ Related [Project-OSRM](https://github.com/Project-OSRM) repositories:
## Quick Start ## Quick Start
The easiest and quickest way to setup your own routing engine backend is to use Docker images we provide. The easiest and quickest way to setup your own routing engine is to use Docker images we provide.
### Using Docker ### Using Docker
We base [our Docker images](https://hub.docker.com/r/osrm/osrm-backend/) on Alpine Linux and make sure they are as lightweight as possible. We base our Docker images ([backend](https://hub.docker.com/r/osrm/osrm-backend/), [frontend](https://hub.docker.com/r/osrm/osrm-frontend/)) on Alpine Linux and make sure they are as lightweight as possible.
``` Download OpenStreetMap extracts for example from [Geofabrik](http://download.geofabrik.de/)
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
docker run -t -v $(pwd):/data osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
docker run -t -v $(pwd):/data osrm/osrm-backend osrm-contract /data/berlin-latest.osrm
docker run -t -i -p 5000:5000 -v $(pwd):/data osrm/osrm-backend osrm-routed /data/berlin-latest.osrm
curl "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true" Pre-process the extract with the car profile and start a routing engine HTTP server on port 5000
```
docker run -t -v $(pwd):/data osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf
docker run -t -v $(pwd):/data osrm/osrm-backend osrm-contract /data/berlin-latest.osrm
docker run -t -i -p 5000:5000 -v $(pwd):/data osrm/osrm-backend osrm-routed /data/berlin-latest.osrm
Make requests against the HTTP server
curl "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
Optionally start a user-friendly frontend on port 9966, and open it up in your browser
docker run -p 9966:9966 osrm/osrm-frontend
xdg-open 'http://127.0.0.1:9966'
In case Docker complains about not being able to connect to the Docker daemon make sure you are in the `docker` group. In case Docker complains about not being able to connect to the Docker daemon make sure you are in the `docker` group.
``` sudo usermod -aG docker $USER
sudo usermod -aG docker $USER
```
After adding yourself to the `docker` group make sure to log out and back in again with your terminal. After adding yourself to the `docker` group make sure to log out and back in again with your terminal.
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "osrm", "name": "osrm",
"version": "5.7.0-latest.5", "version": "5.7.0-latest.6",
"private": false, "private": false,
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.", "description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
"dependencies": { "dependencies": {
@@ -57,7 +57,7 @@
], ],
"main": "lib/index.js", "main": "lib/index.js",
"binary": { "binary": {
"module_name": "node-osrm", "module_name": "node_osrm",
"module_path": "./lib/binding/", "module_path": "./lib/binding/",
"host": "https://mapbox-node-binary.s3.amazonaws.com", "host": "https://mapbox-node-binary.s3.amazonaws.com",
"remote_path": "./{name}/v{version}/{configuration}/", "remote_path": "./{name}/v{version}/{configuration}/",