This module implements a dead-simple, zero-dependency mongodb store for greenlock. This allows you to persist your Let's Encrypt data in mongo for automated TLS certificate issuance and use.
le-store-mongoz does not handle database connections itself; you must pass in Collection
objects you acquire from the mongodb driver.
// once you've connected to mongodb and have a `Db` from `MongoClient`
Greenlock.create({
…
store: require('le-store-mongoz').create(
db.collection('le-accounts'),
db.collection('le-certs')
)
});
Creates a greenlock store.
accountCollection
- a mongodbCollection
where your Let's Encrypt credentials will be stored.certCollection
- a mongodbCollection
where your Let's Encrypt certificates and keys will be stored.
There are other le-store-mongo* packages available; why another?
As of late 2019, other modules implementing a greenlock mongodb store brought in as many as hundreds of dependencies and/or were totally undocumented. As both of these properties are distasteful, I was compelled to create another.