docs: add MongoDB pool settings and advanced test scripts

README.md:
- Add MONGO_POOL_SIZE, MONGO_MIN_POOL_SIZE, MONGO_MAX_IDLE_TIME_MS
  to Core section for production tuning

CONTRIBUTING.md:
- Add 'Advanced Test Scripts' section documenting:
  - test:stress for concurrent write testing
  - test:flaky variants for detecting flaky tests
  - test:timing for finding slow tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Ben West
2026-03-17 14:28:02 -07:00
co-authored by Copilot
parent 3bb100836b
commit abb505b256
2 changed files with 24 additions and 0 deletions
+3
View File
@@ -289,6 +289,9 @@ autonomy for your data:
* `MONGO_PROFILE_COLLECTION`(`profile`) - The collection used to store your profiles
* `MONGO_FOOD_COLLECTION`(`food`) - The collection used to store your food database
* `MONGO_ACTIVITY_COLLECTION`(`activity`) - The collection used to store activity data
* `MONGO_POOL_SIZE` (`10`) - MongoDB connection pool size. Reduce for resource-constrained environments.
* `MONGO_MIN_POOL_SIZE` (`1`) - Minimum pool connections to keep open.
* `MONGO_MAX_IDLE_TIME_MS` (`10000`) - Max idle time (ms) before closing a connection.
* `PORT` (`1337`) - The port that the node.js application will listen on.
* `HOSTNAME` - The hostname that the node.js application will listen on, null by default for any hostname for IPv6 you may need to use `::`.
* `SSL_KEY` - Path to your ssl key file, so that ssl(https) can be enabled directly in node.js. If using Let's Encrypt, make this variable the path to your privkey.pem file (private key).