Skip to content
This repository has been archived by the owner on Feb 7, 2021. It is now read-only.
/ FalconSnake Public archive

🐦🐍 AI for the programming competition "Battle Snake 2019". FalconSnake made it into the second bracket!

License

Notifications You must be signed in to change notification settings

MykalMachon/FalconSnake

Repository files navigation

starter-snake-node(js)

A simple Battlesnake AI written in Javascript for NodeJS.

To get started you'll need a working NodeJS development environment, and at least read the Heroku docs on deploying a NodeJS app.

If you haven't setup a NodeJS development environment before, read how to get started with NodeJS. You'll also need npm for easy JS dependency management.

This client uses Express4 for easy route management, read up on the docs to learn more about reading incoming JSON params, writing responses, etc.

Deploy

Running the AI locally

Fork and clone this repo:

git clone [email protected]:battlesnakeio/starter-snake-node.git
cd battlesnake-node

Install the client dependencies:

npm install

Create an .env file in the root of the project and add your environment variables (optional).

Run the server with auto-reloading on file change:

npm start

Test the client in your browser at 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 NodeJS Heroku app:

heroku create [APP_NAME]

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

Deploying to Zeit

Install the now cli and sign up for a zeit account.

Deploying is simply:

now

About

🐦🐍 AI for the programming competition "Battle Snake 2019". FalconSnake made it into the second bracket!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published