You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
384 B
16 lines
384 B
'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);
|
|
|