1.0.1 • Published 3 years ago

transport-tracker-server v1.0.1

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
3 years ago

Display Server

This server simulates the changing location of a set of vehicles given a GTFS schedule.

Usage

The server has two dependencies, Google Maps APIs to query predicted travel times using the Directions API, and Firebase Realtime Database.

To authorize access to the Google Directions API, add a Google Maps API key in the following places:

  • At the top of generate_paths.js
  • At the top of simulation.js
  • Near the top of test/test.js

Using the process outlined in Directions API: Get a Key.

To authenticate to Firebase, populate the serviceAccountKey.json file using the process outlined in Firebase Admin SDK setup.

To configure which Firebase Realtime Database URL to use to communicate with display-client, configure the databaseURL at the top of main.js.

To install library dependencies, use Node Package Manager.

npm install

To run the server, again use npm.

npm run main

Testing

Please run the following to run the tests:

npm test

And generate a coverage report:

npm run coverage