28 lines
857 B
JavaScript
Raw Normal View History

2019-11-01 04:12:40 -06:00
"use strict";
2020-01-10 17:51:25 -07:00
// This can be a node http app (shown),
// an Express app, or Hapi, Koa, Rill, etc
var app = function(req, res) {
res.end("Hello, Encrypted World!");
};
2019-11-01 04:12:40 -06:00
//require("greenlock-express")
require("../../")
2020-01-10 17:51:25 -07:00
.init({
// Package name+version are taken from <packageRoot>/package.json and used for ACME client user agent
packageRoot: __dirname,
// configDir is relative to packageRoot, not _this_ file
configDir: "./greenlock.d",
2019-11-01 04:12:40 -06:00
2020-01-10 17:51:25 -07:00
// Maintainer email is the contact for critical bug and security notices
// by default package.json.author.email will be used
//maintainerEmail: "jon@example.com",
2019-11-01 04:12:40 -06:00
2020-01-10 17:51:25 -07:00
// Change to true when you're ready to make your app cloud-scale
cluster: false
2019-11-01 15:14:07 -06:00
})
2020-01-10 17:51:25 -07:00
// Serves on 80 and 443
// Get's SSL certificates magically!
.serve(app);