Missing piece of code in "Connect to Cluster"-Example
I think there is a missing piece of code in the generated code-example to connect to the atlas-cluster via Node.js driver and X.509: The definition for "const credentials" should be
"const credentials = fs.readFileSync('<path_to_certificate>')"
instead of
"const credentials = '<path_to_certificate>'"
2
votes
Alexander
shared this idea
-
AdminRicha (Admin, MongoDB) commented
Hi Alexander, this code sample will work for Node.js versions 4.0+. Are you using a version older than this? If so, the code sample will change when your version is selected.
-
AdminRicha (Admin, MongoDB) commented
Hi Alexander, thank you for bringing this to our attention. We're working on a fix to this code sample now.