Skip to content

mriziq/express-2bttns-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 

Repository files navigation

Read Me

This is a basic, example implementation of Express and 2bttns. Play a food preference sorting game and view the results.

Usage

To run this app, you'll need to run both the 2bttns console and the node server used to interact with the console. You can use the basic HTML file to interface.

  1. Run 2bttns
cd 2bttns
npm i
npm run dev
  1. Run Node Server for interacting with 2bttns on client side

Make sure you have these .env variables where your node server is if not successfully pulled from github.

TWOBTTNS_BASE_URL="http://localhost:3001" 
TWOBTTNS_APP_ID="example-app" 
TWOBTTNS_APP_SECRET="example-secret-value"
cd web-app
npm i
node server.js
  1. Open the index.html page in your browser

  2. Play a game (currently set to food preference ranking)

  3. Go back to index.html and click Get Results to view your scores. Play more rounds to see how your rankings change.

Configuring a New Game in 2bttns

  1. Get other example data using the @2bttns/object CLI.
# anywhere
npx @2bttns/objects
  1. Open 2bttns Console at http://localhost:3001/

  2. Log in with admin credentials (u: admin, pwd: admin)

  3. Upload & Tag your objects (Learn how here)

  4. Create a game (Learn how here)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages