0.0.2 • Published 6 years ago

https-dev v0.0.2

Weekly downloads
3
License
MIT
Repository
-
Last release
6 years ago

https-dev

Adds self signed certificates to a https server to be used locally.

Extracted from webpack-dev-server.

Why

  • Developing locally when integrating with third parties especially webhooks can require https
  • Generating certificates is a pain
  • Certificates clutter up the repository

Usage

https

const https = require('https');

const httpsDev = require('https-dev');

const ssl = httpsDev();

https.createServer(ssl, (req, res) => res.end('httpsDev')).listen(3000);

Express

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);

API

Table of Contents

index

https-dev

Returns object https.createServer options

Alternatives

License

MIT © Duncan Beaton