Real-time, location-aware chat.
There a couple of things you need to do before Geochat will work on your machine. Assuming you already have a working Ruby environment and Bundler installed, you can clone the repo in your terminal like so:
$ git clone https://github.com/ngoldman/geochat.git
Then install all the necessary dependencies like so:
$ bundle install
Geochat uses sqlite3 as a database for local development, so you shouldn't have to worry about setting up a database locally. It should just work after you migrate the database like so:
$ bundle exec rake db:migrate
Geochat is configured to use Pusher and Heroku. To get this working locally, you need to register your app with Pusher. You can get a free API account for development (that's what I'm using right now). If you want to use Heroku for deployment, you can add Pusher support through their Pusher add-on without needing to register with Pusher directly.
After you're set up with Pusher, you'll need to add environmental variables. Please note that Pusher provides you with two sets of credentials, one for development and one for production. On development, you'll need the app ID, key and secret provided by Pusher. You can set them in your bash profile like so:
# Geochat Pusher credentials
export GEOCHAT_PUSHER_APP_ID=YOUR_APP_ID
export GEOCHAT_PUSHER_KEY=YOUR_KEY
export GEOCHAT_PUSHER_SECRET=YOUR_SECRET
For production, you'll need to add the Pusher key like so:
heroku config:add GEOCHAT_PUSHER_KEY=YOUR_PRODUCTION_KEY
See Heroku's article on Configuration and Config Vars for more info.
Once all of that's done, you should be good to go. Happy coding!
Geochat is made available under the MIT License.