Skip to content

Commit 9463123

Browse files
Raise the Node.js floor to match the driver it tells you to install (#162)
* Raise the Node.js floor to match the driver it tells you to install The Node.js quick start listed 'Node.js 18 or later' as its prerequisite and then ran an unpinned 'npm install mongodb'. The current driver requires Node >=20.19, so a reader on 18 satisfies the documented prerequisite and then fails at install time with an engine error. The same floor was corrected in documentdb/docs; this is the website-owned copy of the same page. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f18515db-c52f-4197-aa50-d81359c7c763 Signed-off-by: Guanzhou Song <guanzhou.song@gmail.com> * Stop recommending a documented no-op, and finish the sample-data fix Two findings from the second review pass, both verified against the shipped image. The Docker troubleshooting list and the getting-started index both told readers to restart with --log-level debug for more detail. The site's own DocumentDB Local page documents that flag as a known issue: the value is validated at startup but does not change what the container logs, and DOCUMENTDB_LOG_LEVEL is the control that works. The advice was also impossible as written for a second reason -- docker restart cannot change a container's arguments or environment. Point at the env var and say the container has to be re-created. The previous round corrected the sample-data claim on the Docker and mongosh guides but left the Python and VS Code guides saying 'if you started with DocumentDB Local sample data'. Neither page's docker run includes --init-data true, so that condition is never true for someone following those pages, and the reader is left unsure whether an empty result is a mistake. State that it is opt-in, as the other two guides now do. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f18515db-c52f-4197-aa50-d81359c7c763 Signed-off-by: Guanzhou Song <guanzhou.song@gmail.com> --------- Signed-off-by: Guanzhou Song <guanzhou.song@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f18515db-c52f-4197-aa50-d81359c7c763
1 parent 01e98fb commit 9463123

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎app/services/articleService.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ If something does not work as expected:
128128
129129
- Confirm port \`10260\` is available and that \`docker ps\` shows the container running
130130
- Inspect startup, authentication, and TLS errors with \`docker logs documentdb\`
131-
- Restart the container with \`--log-level debug\` for more verbose local diagnostics
131+
- For more gateway detail, re-create the container with \`-e DOCUMENTDB_LOG_LEVEL=debug\`. The \`--log-level\` flag is validated at startup but does not currently change what the container logs, and environment variables are fixed at \`docker run\` — \`docker restart\` cannot change either.
132132
- Use the certificate flow in [DocumentDB Local](/docs/documentdb-local) if your client should validate TLS certificates
133133
- Use [Mongo Shell Quick Start](/docs/getting-started/mongo-shell-quickstart) for a fuller shell walkthrough
134134
@@ -477,7 +477,7 @@ If you prefer a host installation instead of Docker, use [Linux Packages Quick S
477477
478478
Once connected:
479479
480-
1. Expand the connection and open \`sampledb\` if you started with DocumentDB Local sample data.
480+
1. Expand the connection and open \`sampledb\`. This exists only if you started the container with \`--init-data true\`; without it DocumentDB Local starts empty.
481481
2. Open a collection such as \`users\` or \`products\`.
482482
3. Switch between the **Table**, **Tree**, and **JSON** views to confirm the extension is reading data correctly.
483483
4. Create your own database and collection from the context menu, then add a test document like:
@@ -537,7 +537,7 @@ Connect to DocumentDB from Node.js using the official MongoDB driver.
537537
538538
## Prerequisites
539539
540-
- Node.js 18 or later
540+
- Node.js 20.19 or later (required by the current \`mongodb\` driver)
541541
- npm
542542
- [Docker](https://www.docker.com/)
543543
- Basic familiarity with JavaScript
@@ -738,7 +738,7 @@ You should see the recent movie documents printed after a successful \`ping\`.
738738
739739
## Explore the built-in sample data
740740
741-
If you started with DocumentDB Local sample data, add this snippet after \`client.admin.command("ping")\`:
741+
Sample data is **opt-in** — this needs a container started with \`--init-data true\`. Without it \`sampledb\` does not exist and the query returns nothing. Add this snippet after \`client.admin.command("ping")\`:
742742
743743
\`\`\`python
744744
for user in client["sampledb"]["users"].find(
@@ -1025,7 +1025,7 @@ If setup does not work on the first try:
10251025
- Confirm the container is running and port \`10260\` is published with \`docker ps\`.
10261026
- Inspect startup, authentication, and TLS errors with \`docker logs documentdb\`.
10271027
- If you want certificate validation instead of \`tlsAllowInvalidCertificates=true\`, follow the certificate steps in [DocumentDB Local](/docs/documentdb-local).
1028-
- For more verbose local diagnostics, restart DocumentDB Local with \`--log-level debug\`; the available runtime options are documented in [DocumentDB Local](/docs/documentdb-local).
1028+
- For more verbose local diagnostics, re-create DocumentDB Local with \`-e DOCUMENTDB_LOG_LEVEL=debug\` (the \`--log-level\` flag is currently a no-op); the available runtime options are documented in [DocumentDB Local](/docs/documentdb-local).
10291029
- If you are installing on a host instead of Docker, use [Linux Packages Quick Start](/docs/getting-started/packages) or the [Package Finder](/packages) to get the correct apt or rpm flow.
10301030
`;
10311031

0 commit comments

Comments
 (0)