This is loosely based on Heroku's official Getting Started with Ruby App.
web.rbis where the three actions must be implemented:
Each handler is already set up to parse and render JSON.
Setup and Installation
1. Install Ruby
If you're opting for rbenv, this might be handy: Install Ruby
2. Fork and clone this repo:
git clone email@example.com:battlesnakeio/starter-snake-ruby.git cd starter-snake-ruby
gem install bundler
4. Install dependencies:
5. Run the server:
foreman start web
Test the client in your browser: http://localhost:5000
Deploying to Heroku
Click the Deploy to Heroku button at the top or use the command line commands below.
Create a new Heroku app:
heroku apps:create APP_NAME
Push code to Heroku servers:
git push heroku master
Open Heroku app in browser:
Or go directly via http://APP_NAME.herokuapp.com
View/stream server logs:
heroku logs --tail