acme.js-ARCHIVED/examples/https-server.js

12 lines
331 B
JavaScript
Raw Normal View History

2018-04-16 01:04:06 +00:00
'use strict';
var https = require('https');
var server = https.createServer({
key: require('fs').readFileSync('../tests/privkey.pem')
, cert: require('fs').readFileSync('../tests/fullchain.pem')
}, function (req, res) {
res.end("Hello, World!");
}).listen(443, function () {
console.log('Listening on', this.address());
});