Giter VIP home page Giter VIP logo

maps.bikeottawa.ca-backend's Introduction

maps.bikeottawa.ca-backend

Server side for maps.bikeottawa.ca running OSRM and isochrone servers. Tested with Node v6

Installation

Clone and install dependencies:

git clone https://github.com/zzptichka/maps.bikeottawa.ca-backend
cd maps.bikeottawa.ca-backend/
npm install

Setup

  • Copy LTS OSRM files generated by backend.bikeottawa.ca to data directory. You should have 4 directories there: lts1, lts2, lts3, lts4. Scripts on backend.bikeottawa.ca can do that automatically
  • Open port 4000 on your firewall for isochrone server
  • Configure your web server to forward requests based on lts# in url to corresponding OSRM server port(lts1->5001, lts2->5002, lts3->5003, lts4->5004). Your Nginx config could look like this:
server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;
        root /var/www/html
        # catch all v1 routes and send them to OSRM
        location /route/v1/lts1   { proxy_pass http://localhost:5001; }
        location /route/v1/lts2   { proxy_pass http://localhost:5002; }
        location /route/v1/lts3   { proxy_pass http://localhost:5003; }
        location /route/v1/lts4   { proxy_pass http://localhost:5004; }
}

Start

./start-osrm-server.sh
node iso-server.js

maps.bikeottawa.ca-backend's People

Contributors

yaroshkvorets avatar

Watchers

James Cloos avatar Matthew Darwin avatar

maps.bikeottawa.ca-backend's Issues

Isochrone server is returning 502s

Attempting to change the location on the isochrone map is returning 502s with the response:

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>

Figured commenting here would be more likely to be noticed than sending an email.

Thanks for the service, it's great!

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.