đź‘‹ This is my bad attempt at implementing my own Battlesnake.
It is built as a Cloudflare Worker, and the production version is accessible in Battlesnake as MattIPv6.
As this is built as a Cloudflare Worker, you will be using the wrangler
CLI to run it locally, as
well as to deploy it to production. Aliases for the key commands have been added as NPM scripts:
-
To build the Battlesnake locally, with change watching, run
npm run dev
. This will startwrangler
and use the Webpack config to build the Battlesnake worker, and then run it as a locally accessible web server. -
To make the local Battlesnake accessible for testing, you can use any tunnel service. I prefer to use cloudflared and an NPM script is available to spawn one if you have the CLI installed:
npm run tunnel
. -
Finally, to build and deploy the Battlesnake to production (accessible via workers.dev), run the NPM script
npm run publish
.
This project is licensed under the Apache 2.0 license.