feat: add health, stats, OpenAPI, security headers, tests

- /api/health — uptime, version, memory usage
- /api/stats — request count, error rate, cache info
- /api/openapi — OpenAPI 3.0.3 specification
- Security headers: X-Frame-Options, X-Content-Type-Options, X-XSS-Protection
- Request counter middleware
- CONTRIBUTING.md — contribution guidelines
- test.js — integration test suite (18 endpoints)
This commit is contained in:
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ
2026-06-08 22:08:38 +05:30
parent 18e4a84a66
commit e9b0fba22b
5 changed files with 300 additions and 5 deletions
+7
View File
@@ -14,6 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `docs/streaming.md` — Streaming flow guide (3-step with real data)
- `docs/examples.md` — Code examples in cURL, JavaScript, Python, Node.js (all tested)
- `docs/architecture.md` — Project structure, tech stack, design decisions
- `/api/health` — Health check endpoint (uptime, version, memory)
- `/api/stats` — Cache & API statistics (requests, errors, success rate)
- `/api/openapi` — OpenAPI 3.0.3 specification
- Security headers: X-Frame-Options, X-Content-Type-Options, X-XSS-Protection
- Request counter middleware for statistics
- `CONTRIBUTING.md` — Contribution guidelines
- `test.js` — Integration test suite (18 endpoints)
### Fixed
- Clean URLs: `/tos` and `/privacy` instead of `/tos.html` and `/privacy.html`