8000 GitHub - fdterr/MTAPI: JSON proxy server for the MTA's realtime New York City subway feed
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fdterr/MTAPI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Running

Standalone

Python

$ cd python
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python app.py

Node

$ cd node/
$ node index.js

PM2

**In theory, pm2 should be running the app, but if not, restart the process with the following comands: **

Python:

$ cd python/
$ source .venv/bin/activate
$ pm2 start app.py --name mtapi --interpreter python3

Node:

$ cd node/
$ pm2 start index.js

Docker

Please start things in the following order:

  1. Python: docker run -p 5000:5000 fdterr/mtapi:latest
  2. Nodejs

Changes Made to Original Package

python/scripts/make_stations_json.py:

Line 14 should become
with open(args.stations_file, 'r') as f:

Line 36 should become
station['id'] = md5(''.join(station['stops'].keys()).encode('utf-8')).hexdigest()[:ID_LENGTH]

About

JSON proxy server for the MTA's realtime New York City subway feed

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 84.6%
  • JavaScript 11.9%
  • Dockerfile 3.5%
0