2
0
mirror of https://github.com/therootcompany/greenlock.js.git synced 2025-04-20 05:40:38 +00:00
2019-10-20 02:51:19 -06:00

17 lines
384 B
JavaScript

'use strict';
var http = require('http');
var https = require('http2');
var greenlock = require('../greenlock.js').create({
maintainerEmail: 'jon@example.com'
});
function app(req, res) {
res.end('Hello, Encrypted World!');
}
http.createServer(greenlock.plainMiddleware()).listen(8080);
https
.createServer(greenlock.tlsOptions, greenlock.secureMiddleware(app))
.listen(8443);