lighten the load

This commit is contained in:
AJ ONeal 2018-06-29 03:24:58 -06:00
parent 901c8659cf
commit 8c8dde0a7d
2 changed files with 12 additions and 10 deletions

View File

@ -1,5 +1,12 @@
'use strict';
var PromiseA;
try {
PromiseA = require('bluebird');
} catch(e) {
PromiseA = global.Promise;
}
// opts.approveDomains(options, certs, cb)
module.exports.create = function (opts) {
// accept all defaults for greenlock.challenges, greenlock.store, greenlock.middleware
@ -11,14 +18,6 @@ module.exports.create = function (opts) {
};
opts.listen = function (plainPort, port) {
var PromiseA;
try {
PromiseA = require('bluebird');
} catch(e) {
console.warn("Package 'bluebird' not installed. Using global.Promise instead");
console.warn("(want bluebird instead? npm install --save bluebird)");
PromiseA = global.Promise;
}
var promises = [];
var plainPorts = plainPort;
var ports = port;

View File

@ -1,8 +1,8 @@
{
"name": "greenlock-express",
"version": "2.3.0",
"version": "2.3.1",
"description": "Free SSL and managed or automatic HTTPS for node.js with Express, Koa, Connect, Hapi, and all other middleware systems.",
"main": "glx.js",
"main": "index.js",
"homepage": "https://git.coolaj86.com/coolaj86/greenlock-express.js",
"directories": {
"example": "examples"
@ -14,6 +14,9 @@
"le-store-certbot": "^2.1.0",
"redirect-https": "^1.1.5"
},
"files": [
, "lib"
],
"optionalDependencies": {
"spdy": "^3.4.7"
},