Simple reverse proxy for the Google Maps Directions API service.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This repository defines a reverse proxy service for the Google Maps Directions API. It is a service component used by the subway-explorer-webapp, which uses this API to perform route selection in the application front-end.

For more information on why this exists, see the in the subway-explorer-webapp repository.


You will need a Google Maps Directions API key. You will also need to have Node.JS installed.

First, clone the repository:

git clone

Install the necessary libraries from the root folder:

npm install

Create an .env file in the root folder with your Google Maps Directions API credentials:


Start the service.

node index.js

It will accessible from localhost:9000. Here's one URL you can try, to make sure the service is up:


Using the container

This repo contains a Docker file bundled with Node.JS and this application.

To build the container image, run the following from the root folder:

docker build -t residentmario/subway-explorer-gmaps-proxy .

Make sure you have a .env file populated. Then, to run the container (pointing it to localhost:49161):

docker run -p 49161:9000 --env-file .env -d residentmario/subway-explorer-gmaps-proxy

You can visit the following (port-forwarded) URI in the browser to verify that the connection is being served:


You can also jump inside the container by running docker exec -it 949cc5d81abe /bin/bash (replacing the name with the name of the running image, discoverable via docker ps) and inspect the running processes to verify things are running as expected.