https-dev

0.0.2 • Public • Published

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

Dependencies (2)

Dev Dependencies (3)

Package Sidebar

Install

npm i https-dev

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

5.17 kB

Total Files

7

Last publish

Collaborators

  • dunckr