@ducphd2/gle-mongodb-store
v1.0.0
Published
Greenlock store for mongodb
Downloads
7
Maintainers
Readme
le-store-mongoz
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.
Example
// 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')
)
});
API
create(accountCollection, certCollection)
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.
Why?
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.