From 62c1e01ddb10ea283417e24450175ff66c0450f0 Mon Sep 17 00:00:00 2001 From: Noah Laux Date: Thu, 13 Sep 2018 15:04:43 +0200 Subject: [PATCH] chore(examples/with-https): using destructuring --- examples/with-https/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/with-https/index.js b/examples/with-https/index.js index 84aa7a24..988a29c2 100644 --- a/examples/with-https/index.js +++ b/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));