httpsOptions
This commit is contained in:
parent
56244d4d84
commit
aafc101f3e
10
serve.js
10
serve.js
|
@ -54,7 +54,7 @@ function createInsecureServer(port, pubdir, opts) {
|
||||||
|
|
||||||
function createServer(port, pubdir, content, opts) {
|
function createServer(port, pubdir, content, opts) {
|
||||||
return new PromiseA(function (resolve) {
|
return new PromiseA(function (resolve) {
|
||||||
var server = https.createServer(opts);
|
var server = https.createServer(opts.httpsOptions);
|
||||||
var app = require('./app');
|
var app = require('./app');
|
||||||
|
|
||||||
var directive = { public: pubdir, content: content, livereload: opts.livereload
|
var directive = { public: pubdir, content: content, livereload: opts.livereload
|
||||||
|
@ -140,7 +140,7 @@ function run() {
|
||||||
var tls = require('tls');
|
var tls = require('tls');
|
||||||
|
|
||||||
// letsencrypt
|
// letsencrypt
|
||||||
var cert = require('localhost.daplie.com-certificates').merge({});
|
var httpsOptions = require('localhost.daplie.com-certificates').merge({});
|
||||||
var secureContext;
|
var secureContext;
|
||||||
|
|
||||||
var opts = {
|
var opts = {
|
||||||
|
@ -148,9 +148,9 @@ function run() {
|
||||||
, debug: argv.debug
|
, debug: argv.debug
|
||||||
, email: argv.email
|
, email: argv.email
|
||||||
, httpsOptions: {
|
, httpsOptions: {
|
||||||
key: cert.key
|
key: httpsOptions.key
|
||||||
, cert: cert.cert
|
, cert: httpsOptions.cert
|
||||||
//, ca: cert.ca
|
//, ca: httpsOptions.ca
|
||||||
}
|
}
|
||||||
, argv: argv
|
, argv: argv
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue