Skip to content

stair-ch/snakehack-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snakehack-ruby

A simple SnakeHack AI written in Ruby with Sinatra.

This is loosely based on Heroku's official Getting Started with Ruby App.

Deploy

App Overview

  • web.rb is where the three actions must be implemented: start, move, end

  • Each handler is already set up to parse and render JSON.

Running the AI locally

Fork and clone this repo:

git clone [email protected]:stair-ch/snakehack-ruby.git
cd snakehack-ruby

Install dependencies:

bundle install

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 create [APP_NAME] --region eu

Push code to Heroku servers:

git push heroku master

Open Heroku app in browser:

heroku open

Or go directly via http://APP_NAME.herokuapp.com

View/stream server logs:

heroku logs --tail

About

ruby snakehack starter kit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages