greenlock-express.js/single.js

28 lines
576 B
JavaScript
Raw Normal View History

2019-10-27 05:52:19 +00:00
"use strict";
require("./main.js");
var Single = module.exports;
var Servers = require("./servers.js");
Single.create = function(opts) {
2019-11-01 21:14:07 +00:00
var greenlock = require("./greenlock.js").create(opts);
2019-10-27 07:19:44 +00:00
2019-11-01 21:14:07 +00:00
var servers = Servers.create(greenlock);
2019-10-27 05:52:19 +00:00
2019-11-01 21:14:07 +00:00
var single = {
2019-11-03 08:28:37 +00:00
ready: function(fn) {
2019-11-01 21:14:07 +00:00
fn(servers);
return single;
},
master: function(/*fn*/) {
// ignore
//fn(master);
return single;
}
};
2019-11-03 08:28:37 +00:00
// backwards compat starts now
single.serve = single.ready;
2019-11-01 21:14:07 +00:00
return single;
2019-10-27 05:52:19 +00:00
};