Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDB connection with SSL #126

Open
D-32 opened this issue Jul 12, 2020 · 1 comment
Open

MongoDB connection with SSL #126

D-32 opened this issue Jul 12, 2020 · 1 comment

Comments

@D-32
Copy link

D-32 commented Jul 12, 2020

For anybody that's looking to connect to a database with SSL, I got it to work by modifying agendash-standalone.js.
Replace line 21 with:

const certFileBuf = fs.readFileSync(
  "mycert.pem"
);
const agenda = new Agenda({
  db: {
    address: program.db,
    collection: program.collection,
    options: {
      sslCA: certFileBuf,
    },
  },
});
@jaywink
Copy link

jaywink commented Oct 20, 2022

Does setting the env variable NODE_EXTRA_CA_CERTS work for you? It solved the same problem for a case for us, not needing to modify the code and get SSL with a MongoDB.

See https://nodejs.org/api/cli.html#node_extra_ca_certsfile

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

No branches or pull requests

2 participants