greenlock-express.js/examples/force-renew.js

30 lines
737 B
JavaScript
Raw Permalink Normal View History

2016-08-16 17:05:41 +00:00
'use strict';
2017-01-25 22:02:16 +00:00
//require('greenlock-express')
2016-08-16 17:05:41 +00:00
require('../').create({
2018-05-19 23:54:08 +00:00
// Let's Encrypt v2 is ACME draft 11
version: 'draft-11'
, server: 'https://acme-v02.api.letsencrypt.org/directory'
// Note: If at first you don't succeed, stop and switch to staging
// https://acme-staging-v02.api.letsencrypt.org/directory
2016-08-16 17:05:41 +00:00
2016-08-16 17:26:54 +00:00
, email: 'john.doe@example.com'
2016-08-16 17:05:41 +00:00
, agreeTos: true
2016-08-16 17:26:54 +00:00
, approvedDomains: [ 'example.com', 'www.example.com' ]
2016-08-16 17:05:41 +00:00
, app: require('express')().use('/', function (req, res) {
res.end('Hello, World!');
})
, renewWithin: (91 * 24 * 60 * 60 * 1000)
, renewBy: (90 * 24 * 60 * 60 * 1000)
2018-05-10 06:53:45 +00:00
// Get notified of important updates and help me make greenlock better
, communityMember: true
2016-08-16 17:05:41 +00:00
, debug: true
}).listen(80, 443);