tlacoyodefrijol / mbta-ninja

MBTA Ninja!

Home Page:http://mbta.ninja

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MBTA Ninja

MBTA Ninja is a crowdsourced alerting system for public transit in Boston.

View the site: mbta.ninja Follow us on Twitter: @mbta_ninja

The project started as a weekend hack by David Lago, Geoffrey Litt, and Radhika Malik for CodeAcross Boston 2015. The site is built using Meteor.js and Materialize.css, and deployed on Heroku.

Contributing

We welcome contributions that would make this tool more useful for the Boston community -- whether it's adding support for more MBTA lines, or entire new features.

Please create a GitHub issue if you have an idea. And if you're able to code a solution and open a pull request, even better!

Our roadmap is available on Waffle.

Deployment

MBTA Ninja is deployed on Heroku. Below is a quick guide to getting it up and running so you don't have to suffer too much to get it set up.

Prerequisite:

  • If you dont have a heroku account, make one before you start.

  • Install Meteor.js

curl https://install.meteor.com/ | sh

Make a heroku app

In order to get up and running on Heroku, you first have to make a heroku app. We'll clone this repo as the example which you can modify.

First, you have to login:

	heroku login

Then, clone this repo and enter that folder:

git clone https://github.com/codeforboston/mbta-ninja.git
cd mbta-ninja

Next, make the heroku app:

heroku create <app_name>

app_name is optional and can be whatever you want it to be. A crazy name you can change later will be created if you choose not to supply a name.

Set the buildpack

Heroku uses framework-specific buildpacks in order to know how to run your app.

To deploy this repo as a heroku app, you'll need to specify that it should be run using the custom meteor.js buildpack. To do this, all you need to run is:

heroku buildpacks:set https://github.com/jordansissel/heroku-buildpack-meteor.git

You should be good to go!

Add a MongoLab Extension

You'll need a database to handle the reports of incidents as well as the related up and down votes. This is all set up in the code, though you'll need to make an instance of a MongoLab DB in order to handle the data for this specific instance.

To do this, run:

heroku addons:create mongolab:sandbox

Heroku will ask you to enter a credit card if you haven't already. You'll need to do this even though the sandbox version is free and you won't be charged.

Go to the heroku dashboard for your app and find the Settings tab. Click on reveal config vars. There should have been one made for MONGOLAB_URI. Make another one with the key MONGO_URL using the same value.

Push to the repo

Once you are ready to deploy, run the following

git add -A
git commit -m "first commit"
git push heroku master

Building meteor.js may take a while.

Make sure at least one instance is running:

heroku ps:scale web=1

Once you are done, your app should be ready at app_name.herokuapp.com! You can quickly open it by running:

heroku open

If your build is successful, but you get the Application Error page that says

An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

It can be that by default Heroku opens the app from https://. If you open the URL from http:// it will work fine. To change the settings, you need to add ROOT_URL to the Config Variables in your app settings; the value is http://YOUR-APP-NAME.herokuapp.com.

License

MBTA Ninja is released under the MIT License

About

MBTA Ninja!

http://mbta.ninja

License:MIT License


Languages

Language:JavaScript 60.4%Language:HTML 33.3%Language:CSS 6.3%