@abtnode/certificate-manager 中文文档教程
Certificate Manager
Manage SSL certificates:
- 管理上传的证书
- 生成/自动更新 Let's Encrypt 证书
- 过期提醒
Usage
Well-known route
const certificateManager = require('@abtnode/certificate-manager');
app.use(certificateManager.routes);
Core Manager
Initialize
const CertificateManager = require('@abtnode/certificate-manager/sdk/manager');
const certManager = new CertificateManager({
maintainerEmail: '{email of the certificate manager}',
dataDir: '{data directory of the certificate manager}',
});
certManager.start(); // Start renewal cron jobs
Events
- cert.issued: Issue certificate successfully
- cert.error: Issue certificate failed
CRUD
getAll()
: Get all certificates, includes in-progress status.getAllNormal()
: Get normal state certificate, without in-progress status.getByDomain(domain)
: Get the certificate by domain.add(certificate)
: Add certificate to database.issue(domain)
: Add the generate certificate task.upsertByDomain(certificate)
: Add certificate to database, if the domain already exists, update it.update(id, certificate)
: Update certificate by ID.remove(id)
: Remove certificate by ID.addWithoutValidations(certificate)
: Same asadd(certificate)
, but no data validation.
更多
你可能也喜欢
- 256art 中文文档教程
- 4sure-error-handler 中文文档教程
- @2-bit/umd-ts 中文文档教程
- @36node/event-sdk 中文文档教程
- @4geit/rct-chatbox-list-store 中文文档教程
- @4geit/rct-common-store 中文文档教程
- @4geit/swg-get-user-with-credentials-helper 中文文档教程
- @6c65726f79/custom-titlebar 中文文档教程
- @abhishek_ranjan/example_package 中文文档教程
- @abidhkm/react-scripts 中文文档教程