Dockerfile: stop baking secrets into the image. Only NODE_ENV
remains; all runtime config (MONGO_URI, SMTP_*, token
secrets) comes from the environment so one image runs
anywhere. Install curl for container healthchecks. App
variable names untouched (singular JWT_EXPIRE as read by
models/User.js).
docker-compose.example.yml: rewrite as a prod run template
for git.linuxhg.com/games-database/games-api (IMAGE_TAG,
default latest) with restart, env_file .env, and a curl
/health healthcheck. Copy to docker-compose.yml next to
the server .env, then pull and up. Full variable list kept
commented out so values can live in the file instead of
.env if preferred.
Returns 200 { status: 'ok' } for container healthchecks and
monitoring. Placed before all /api/* routes so it bypasses
auth; intentionally static with no DB dependency so the
container reports healthy whenever the process is serving.
Add NODE_ENV (used by config/db.js and controllers/auth.js
to switch MONGO_URI/MONGO_DEV_URI and secure cookies).
Drop PATH, BUN_RUNTIME_TRANSPILER_CACHE_PATH, and
BUN_INSTALL_BIN leaked from container runtime env; they are
not read by the app.
Drop JWT_EXPIRES duplicate; app reads JWT_EXPIRE
(models/User.js expiresIn), matching .env.
Restore SECURE=false default (used by utils/sendEmail.js
via yn(Bun.env.SECURE)).
Keep list aligned with Dockerfile and .env keys so the
example stays a valid template for server deployments.
Allow callers to pass either a raw Steam app ID or a full store URL (e.g. https://store.steampowered.com/app/730/...) in req.body.steamId.
In create() in controllers/games.js:
- normalize input into a local steamId variable: if the value includes store.steampowered.com, extract the numeric ID via match(/\d+/)[0], otherwise use the value as-is
- use the normalized steamId for both duplicate checks: user-scoped lookup (steamId + accessedBy.user) and global lookup
This lets users paste a copied store link directly without manually stripping the app ID, while keeping existing raw-ID behavior unchanged.
Apply Prettier default formatting across the games controller with no logic changes:
- single -> double quotes, add missing semicolons
- 2-space indentation and consistent line wrapping
- expand dense ternary/decode blocks in create() and update() for readability
This isolates the upcoming create() Steam URL feature so its functional diff stays small and reviewable.