This package has been deprecated

Author message:

This package is no longer updated on npm - install it directly from github.com:right-track/right-track-pwa

right-track-online

1.0.0 • Public • Published

Right Track Online

node module: right-track-online
GitHub repo: right-track/right-track-online


This module is an Express-backed website for viewing Right Track commuter train schedules and real-time status information.

Features

The following features are supported by the website:

  • Trip Searches (direct and with transfers)
  • Right Track Station Feeds (real-time departure status information)
  • Right Track Transit Feeds (real-time transit status information)
  • Right Track User Registration
  • Right Track User Authentication
  • User Favorites

Demo

A working implementation of this website is available at https://online.righttrack.io/.

Dependencies

Right Track API Server

The website requires access to a Right Track API Server in order to obtain the transit information. Access to a Right Track API Server requires a valid API Client Key with the following permissions:

  • auth
  • registration
  • favorites
  • transit
  • gtfs
  • stations
  • search
  • updates

Installation

Install the Right Track Online website globally via npm:

npm install -g right-track-online

This will install the executable right-track-online into your $PATH.

Configuration

The following are the default configuration properties for the website:

{
  "name": "Right Track Online",
  "port": 3001,
  "maintainer": {
    "name": "David Waring",
    "email": "dev@davidwaring.net",
    "website": "https://www.davidwaring.net",
    "repository": "https://github.com/right-track/right-track-online"
  },
  "api": {
    "host": "http://localhost:3000",
    "clientId": "",
    "clientKey": "",
    "secret": ""
  },
  "colors": {
    "primary": "#00897B",
    "primaryText": "#ffffff",
    "secondary": "#FFC107",
    "secondaryText": "#000000"
  }
}

A separate JSON file can be used to override the default values. The new file will be merged with the existing default configuration.

At a minimum, the Right Track API Server host, clientId, clientKey, and secret properties must be set. For example:

{
  "api": {
    "host": "https://your.apiserver.com",
    "clientId": "client_id",
    "clientKey": "client_key",
    "secret": "secret"
  }
}

Usage

The website can be started using the right-track-online executable with the path to your configuration file as an argument.

right-track-online /path/to/config.json

The website will then be available at the specified port (3001 be default) and viewed at http://localhost:3001.

The site is designed to be accessed via a secure (https) connection (cookies are set to be only sent via secure connections) and it is recommended to put the site behind a reverse proxy server (such as nginx, etc).

Readme

Keywords

none

Package Sidebar

Install

npm i right-track-online

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

3.84 MB

Total Files

91

Last publish

Collaborators

  • dwaring87