Adds self signed certificates to a https server to be used locally.
Extracted from webpack-dev-server.
- Developing locally when integrating with third parties especially webhooks can require https
- Generating certificates is a pain
- Certificates clutter up the repository
npm install https-dev
const https = require('https');
const httpsDev = require('https-dev');
const ssl = httpsDev();
https.createServer(ssl, (req, res) => res.end('httpsDev')).listen(3000);
const express = require('express');
const https = require('https');
const httpsDev = require('https-dev');
const ssl = httpsDev();
const app = express();
app.get('/', (req, res) => res.send('httpsDev'));
https.createServer(ssl, app).listen(3000);
https-dev
Returns object https.createServer options
MIT © Duncan Beaton