lighten the load
This commit is contained in:
parent
901c8659cf
commit
8c8dde0a7d
|
@ -1,5 +1,12 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var PromiseA;
|
||||||
|
try {
|
||||||
|
PromiseA = require('bluebird');
|
||||||
|
} catch(e) {
|
||||||
|
PromiseA = global.Promise;
|
||||||
|
}
|
||||||
|
|
||||||
// opts.approveDomains(options, certs, cb)
|
// opts.approveDomains(options, certs, cb)
|
||||||
module.exports.create = function (opts) {
|
module.exports.create = function (opts) {
|
||||||
// accept all defaults for greenlock.challenges, greenlock.store, greenlock.middleware
|
// accept all defaults for greenlock.challenges, greenlock.store, greenlock.middleware
|
||||||
|
@ -11,14 +18,6 @@ module.exports.create = function (opts) {
|
||||||
};
|
};
|
||||||
|
|
||||||
opts.listen = function (plainPort, port) {
|
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 promises = [];
|
||||||
var plainPorts = plainPort;
|
var plainPorts = plainPort;
|
||||||
var ports = port;
|
var ports = port;
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "greenlock-express",
|
"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.",
|
"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",
|
"homepage": "https://git.coolaj86.com/coolaj86/greenlock-express.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"example": "examples"
|
"example": "examples"
|
||||||
|
@ -14,6 +14,9 @@
|
||||||
"le-store-certbot": "^2.1.0",
|
"le-store-certbot": "^2.1.0",
|
||||||
"redirect-https": "^1.1.5"
|
"redirect-https": "^1.1.5"
|
||||||
},
|
},
|
||||||
|
"files": [
|
||||||
|
, "lib"
|
||||||
|
],
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"spdy": "^3.4.7"
|
"spdy": "^3.4.7"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue