Open mirsahib opened 2 years ago
I am trying to use the only the greenlock module with my server so that I have more customization capability The code is given below
greenlock
const app = require('./app.ts'); const path = require('path'); const pkg = require('../package.json'); const rootdir = path.join(__dirname, '../'); console.log(rootdir); const Greenlock = require('greenlock'); const greenlock = Greenlock.create({ packageRoot: rootdir, configDir: './greenlock.d/', packageAgent: pkg.name + '/' + pkg.version, maintainerEmail: 'mir@bonton.app', staging: false, notify: function (event: any, details: any) { if ('error' === event) { // `details` is an error object in this case console.error('details', details); } }, }); greenlock.manager .defaults({ agreeToTerms: true, subscriberEmail: 'mir@bonton.app' }) .then(function(fullConfig:any) { console.log('fullconfig',fullConfig) }); const altnames = ['con.getbonton.com']; greenlock .add({ subject: altnames[0], altnames: altnames, }) .then(function (data: any) { // saved config to db (or file system) console.log('config', data); }); app.listen(80) app.listen(443)
I am getting dry challenge failed error when I try to run the above code
I am trying to use the only the
greenlock
module with my server so that I have more customization capability The code is given belowI am getting dry challenge failed error when I try to run the above code