2019-10-27 05:52:19 +00:00
|
|
|
"use strict";
|
|
|
|
|
2019-10-28 07:06:43 +00:00
|
|
|
require("./")
|
|
|
|
.init(initialize)
|
|
|
|
.serve(worker)
|
|
|
|
.master(function() {
|
|
|
|
console.log("Hello from master");
|
|
|
|
});
|
2019-10-27 05:52:19 +00:00
|
|
|
|
2019-10-28 07:06:43 +00:00
|
|
|
function initialize() {
|
|
|
|
var pkg = require("./package.json");
|
|
|
|
var config = {
|
|
|
|
package: pkg,
|
|
|
|
//serverId: "bowie.local",
|
|
|
|
//servername: "foo-gl.test.utahrust.com",
|
|
|
|
staging: true,
|
2019-10-27 05:52:19 +00:00
|
|
|
|
2019-10-28 07:06:43 +00:00
|
|
|
challenges: {
|
|
|
|
"dns-01": {
|
|
|
|
module: "acme-dns-01-digitalocean"
|
|
|
|
}
|
|
|
|
},
|
2019-10-27 07:19:44 +00:00
|
|
|
|
2019-10-28 07:06:43 +00:00
|
|
|
notify: function (ev, params) {
|
|
|
|
console.log(ev, params);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
return config;
|
|
|
|
}
|
2019-10-27 05:52:19 +00:00
|
|
|
|
2019-10-28 07:06:43 +00:00
|
|
|
function worker(glx) {
|
|
|
|
console.info();
|
|
|
|
console.info("Hello from worker");
|
2019-10-27 05:52:19 +00:00
|
|
|
|
2019-10-28 07:06:43 +00:00
|
|
|
glx.serveApp(function(req, res) {
|
|
|
|
res.end("Hello, Encrypted World!");
|
2019-10-27 05:52:19 +00:00
|
|
|
});
|
2019-10-28 07:06:43 +00:00
|
|
|
}
|