Skip to content

awpeacock/werewolf

Repository files navigation

Werewolf Game

A web-based implementation of the classic party game, built using Vue 3 and Nuxt 3.

Setup

Make sure to install dependencies:

npm install

Environment Configuration

he following environment variables must be defined in a .env file:

AWS_REGION
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DYNAMODB_TABLE

You can create multiple .env files for different environments, such as:

  • .env.local
  • .env.dev
  • .env.qa
  • .env.preprod
  • .env.prod

To specify which environment to use when running a script, pass the --env=<name> flag (e.g., --env=dev). If no environment is specified, the default .env file will be used if present (except when running tests, where the default will be .env.test).

AWS Provisioning

To provision AWS resources for the selected environment:

npm run setup --env=dev

To teardown these resources:

npm run destroy --env=dev

Development

Start the development server at http://localhost:3000:

npm run dev

By default, this will also run the setup script. You can skip setup with:

npm run dev --setup=no

Production

To build the application for production:

npm run build

This will also run the setup script by default unless disabled:

npm run build --setup=no

Previewing the Production Build

To locally preview the built site:

npm run preview

This command also triggers a build unless explicitly skipped:

npm run preview --build=no

Testing

Run the test suite with:

npm run test

By default, this will use the test environment, and will automatically provision the necessary AWS resources before running tests. Once the tests complete, the environment will be torn down.

To skip the setup step (e.g., when testing locally against an already provisioned environment), use:

npm run test --setup=no

Script Flags Summary

Most scripts support the following optional flags:

  • --env=<environment> : Specify the environment configuration to use.
  • --setup=no : Skip automatic setup when starting or building the app.
  • --build=no : Skip building the app before previewing (used with npm run preview).

License

This project is licensed under the MIT License with the Commons Clause — meaning it may not be used for commercial purposes. See the LICENSE file for full details.

About

Website version of the party game.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published