- You will need get your MTA API KEY to access departure times.
- Ruby 3.0.0 or later as well as the gems listed in Gemfile (run
bundle install
). - Bundler v2+.
Both the installation and usage of this application requires a command line interface (e.g., Terminal or iTerm2 for macOSX users).
-
Run
git clone https://github.com/kylejb/nyc-mta-station-arrival-feed.git
in the directory/folder of your choice andcd nyc-mta-station-arrival-feed/
once the download is complete. -
You should now be in the root directory of the project. Type in
ls
and hit enter. You are in the right place, if you see "bin", "config", "db", "demo", "lib", "README", etc.
From the root directory of the project (see Step 2), the following commands must be inputted as written:
-
Run
rake db:migrate
to initialize a local copy of my database model on your computer. -
Run
rake db:seed
to populate your database with TrainStation data; uncomment and modify line 15 in db/seeds.rb, if you want to initialize database with the username and password of your choice.- It's okay to re-run
rake db:seed
if you decide to initialize the database with your credentials later.
- It's okay to re-run
-
Finally,
ruby bin/run.rb
to run the application. Enjoy!
- Kyle Burda (@kylejb)