Skip to content

beccam/battlestax-tutorial

 
 

Repository files navigation

BattleStax

BattleStax is a stateful JAMStack game that is wholesome fun for the entire crew.

Actions Status

Netlify Status

Project Structure

BattleStax's folder structure is (mostly) generated from Create React App. We then add a Netlify Functions and Github Actions.

Prerequisites

  • A Github account - Github
  • A fork of the BattleStax Tutorial repository - Repository
  • NodeJS 12 - Download - Recommended alternative: Setup your local development environment with nodeenv
  • A Netlify account (it's free!) - Netlify
  • An Astra account and database (it's free!) - Astra

Using nodeenv (recommended)

Using nodeenv allows you to keep your NodeJS version and dependencies isolated for the project you're working on. To get started using it for BattleStax, install it using homebrew or easy_install.

# install using homebrew
brew install nodeenv

# install using easy_install
sudo easy_install nodeenv

Once nodeenv is installed, setup a virtualenv in the project folder, and then activate it.

# setup a nodeenv in the venv folder using NodeJS 12
nodeenv venv --node=12.18.4

# activate the nodeenv
. venv/bin/activate

Working with BattleStax

Create a .env file and fill it with values from the .env.example file.

Make sure the package dependencies are installed

# install dependencies
npm install

Then, start the app in dev mode. Changes in the src or functions directories will trigger reloads.

# start battlestax in dev mode
npm run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 49.5%
  • HTML 31.1%
  • CSS 14.2%
  • Shell 5.2%