Skip to content

Rework app configuration, validation, and image uploads#5

Open
Jorel97 wants to merge 1 commit into
dephizee:masterfrom
Jorel97:codex/rework-photo-collection-5usdc
Open

Rework app configuration, validation, and image uploads#5
Jorel97 wants to merge 1 commit into
dephizee:masterfrom
Jorel97:codex/rework-photo-collection-5usdc

Conversation

@Jorel97

@Jorel97 Jorel97 commented May 29, 2026

Copy link
Copy Markdown

Closes #1

Summary

  • make the server port and MySQL connection configurable through environment variables
  • add JSON error helpers and required-field validation for signup, login, collection, photo, and upload routes
  • harden /public/images/* serving against path traversal and return correct image content types
  • make upload paths collision-resistant and sanitize collection directory names
  • add focused Node test coverage for field validation, safe image resolution, content types, and upload path generation
  • document local configuration and test commands

Verification

  • node --check server.js
  • node --check lib/http.js && node --check lib/static-images.js && node --check lib/uploads.js && node --check lib/fileserver.js
  • node --test (8 passing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework my old app

1 participant