Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gv14982/tech-friends-battle-snake
https://github.com/gv14982/tech-friends-battle-snake
hacktoberfest
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/gv14982/tech-friends-battle-snake
- Owner: GV14982
- License: mit
- Created: 2023-10-17T01:26:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-07T03:14:38.000Z (about 1 year ago)
- Last Synced: 2023-11-07T05:12:33.809Z (about 1 year ago)
- Topics: hacktoberfest
- Language: TypeScript
- Homepage:
- Size: 82 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Battlesnake TypeScript Starter Project
An official Battlesnake template written in TypeScript. Get started at [play.battlesnake.com](https://play.battlesnake.com).
![Battlesnake Logo](https://media.battlesnake.com/social/StarterSnakeGitHubRepos_TypeScript.png)
This project is a great starting point for anyone wanting to program their first Battlesnake in TypeScript. It can be run locally or easily deployed to a cloud provider of your choosing. See the [Battlesnake API Docs](https://docs.battlesnake.com/api) for more detail.
[![Run on Replit](https://repl.it/badge/github/BattlesnakeOfficial/starter-snake-typescript)](https://replit.com/@Battlesnake/starter-snake-typescript)
## Technologies Used
This project uses [TypeScript](https://www.typescriptlang.org/), [Node.js](https://nodejs.org/en/), and [Express](https://expressjs.com/). It also comes with an optional [Dockerfile](https://docs.docker.com/engine/reference/builder/) to help with deployment.
## Run Your Battlesnake
Install dependencies using npm
```sh
npm install
```Start your Battlesnake
```sh
npm run start
```You should see the following output once it is running
```sh
Running Battlesnake at http://0.0.0.0:8000
```Open [localhost:8000](http://localhost:8000) in your browser and you should see
```json
{"apiversion":"1","author":"","color":"#888888","head":"default","tail":"default"}
```## Play a Game Locally
Install the [Battlesnake CLI](https://github.com/BattlesnakeOfficial/rules/tree/main/cli)
* You can [download compiled binaries here](https://github.com/BattlesnakeOfficial/rules/releases)
* or [install as a go package](https://github.com/BattlesnakeOfficial/rules/tree/main/cli#installation) (requires Go 1.18 or higher)Command to run a local game
```sh
battlesnake play -W 11 -H 11 --name 'TypeScript Starter Project' --url http://localhost:8000 -g solo --browser
```## Next Steps
Continue with the [Battlesnake Quickstart Guide](https://docs.battlesnake.com/quickstart) to customize and improve your Battlesnake's behavior.
**Note:** To play games on [play.battlesnake.com](https://play.battlesnake.com) you'll need to deploy your Battlesnake to a live web server OR use a port forwarding tool like [ngrok](https://ngrok.com/) to access your server locally.