A simple, animated Tic Tac Toe game served as static files.
- Optional (for local static server):
- Node.js 18+ or Python 3
- Optional (for linting):
- npm (comes with Node.js)
- Optional (for containerized run):
- Docker and Docker Compose v2
The app is pure static content under public/. Use any static file server:
- Option A: Python
cd public
-m http.server 8080
# Open http://localhost:8080- Option B: Node (using
npx serve)
npx --yes serve public -l 8080
# Open http://localhost:8080- Option C: Any editor extension (e.g., Live Server) targeting the
public/folder.
An Nginx image serves the static site from /usr/share/nginx/html.
- Build image:
docker build -t tic-tac-toe:latest -f dockerfile .- Run container:
docker run --rm -p 80:80 tic-tac-toe:latest
# Open http://localhost/A compose file is provided in tic-deploy/docker-compose.yml.
- Use an existing image (recommended):
IMAGE_NAME=tic-tac-toe:latest docker compose -f tic-deploy/docker-compose.yml up -d
# Healthcheck expects http://localhost to respond- Or first build locally, then bring up compose:
docker build -t tic-tac-toe:latest -f dockerfile .
IMAGE_NAME=tic-tac-toe:latest docker compose -f tic-deploy/docker-compose.yml up -d- Lint:
npm run lintNote: There is no bundler/build step; edit public/index.html directly.
A Jest dev dependency is present, but the test script is currently a placeholder. You can wire up tests under tests/ and update package.json accordingly.
public/ # Static site (entry: index.html)
dockerfile # Nginx-based static hosting image
tic-deploy/ # Docker Compose deployment helper