flask-wordle Tailwind Templates

Flask Wordle

A wordle game with absurdle mode powered by flask.

Flask Wordle

A wordle game with absurdle mode powered by flask.

TL;DR

Make sure you have conda/mamba and node/nvm installed, and run:

nvm install && nvm use
npm install && npm run webpack
mamba env create
mamba activate wordle
python webapp.py --path ./path/to/file.txt              # In production mode or 
python webapp.py --debug --path ./words/default.txt     # In debug mode

The application should be running at port 5000.

List of dependencies

Python dependencies

Package Version Channel Settings Remarks
python >=3.12.0 conda-forge environment.yml
flask >=3.0 conda-forge environment.yml
waitress >=3.0 conda-forge environment.yml

Javascript dependencies

Package Version Channel Settings Remarks
typescript >=5.5 npm package.json
sass >=1.77 npm package.json
webpack >=5.93 npm package.json

Install Python dependencies

A. With YAML configuration

mamba env create                            # For production
mamba env create -f environment.dev.yml     # For development
mamba activate wordle

B. With CLI

mamba create -n wordle
mamba activate wordle

mamba install -c conda-forge flask cython waitress -y
mamba install -c conda-forge regex -y

# Dev dependencies
mamba install -c conda-forge ipykernel djlint ruff -y

Install Javascript dependencies

  • Install nvm if needed

Automatically config and generate js and css

bash node.sh

Manually config nvm and node

nvm install
nvm use

npm install

Webpack

npm run webpack                 # In production mode or
npm run webpack:watch           # In debug mode

Ruff

ruff check .                # Check mode
ruff check . --watch        # Watch mode

Run the app

python webapp.py --path ./path/to/file.txt           # In production mode or
python webapp.py --flask --path ./path/to/file.txt   # In flask mode or
python webapp.py --debug --path ./path/to/file.txt   # In debug mode
    -h, --help                      Show this help message and exit
    -f, --flask                     Run under flask (default: False)
    -d, --debug                     Debug under flask (default: False)
    -t, --test                      Create app only (default: False)
    -s, --host HOST                 Server host (default: None)
    -p, --port PORT                 Server port (default: None)
    --path PATH                     Wordle word list path (Required: True)
    --rounds ROUNDS                 max number of rounds (default: 6)

Log files

The log file is located at handler.log

Remarks

  • Normally the answers are logged for debug propose (Under debug mode)
  • It is recommended to set a larger number for absurdle mode (host cheat)

Top categories

Loading Svelte Themes