This is not GitHub.com

Like what you see? Install OctoLinker now!

Skip to content
Permalink
Browse files

chore(examples/with-https): using destructuring

  • Loading branch information...
noahlaux authored and timneutkens committed Sep 13, 2018
1 parent 94fd6e5 commit 62c1e01ddb10ea283417e24450175ff66c0450f0
Showing with 2 additions and 6 deletions.
  1. +2 −6 examples/with-https/index.js
@@ -1,15 +1,11 @@
const https = require('https');
const {run, send} = require('micro');

const cert = require('openssl-self-signed-certificate');
const {key, cert, passphrase} = require('openssl-self-signed-certificate');

const PORT = process.env.PORT || 3443;

const options = {
key: cert.key,
cert: cert.cert,
passphrase: cert.passphrase
};
const options = {key, cert, passphrase};

const microHttps = fn => https.createServer(options, (req, res) => run(req, res, fn));

0 comments on commit 62c1e01

Please sign in to comment.
You can’t perform that action at this time.