mirror of
https://github.com/therootcompany/greenlock-express.js.git
synced 2025-02-23 21:28:05 +00:00
don't require bluebird
This commit is contained in:
parent
2bd05345d2
commit
d031ad10a1
9
lex.js
9
lex.js
@ -10,7 +10,14 @@ module.exports.create = function (opts) {
|
||||
};
|
||||
|
||||
opts.listen = function (plainPort, port) {
|
||||
var PromiseA = require('bluebird');
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user