# https-dev

> Self signed certificates for local https

Latest version **0.0.2** (published 2018-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install https-dev
pnpm add https-dev
yarn add https-dev
bun add https-dev
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-08-20 |
| First published | 2018-08-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Duncan Beaton |
| Maintainers | dunckr |

## Links

- npm: https://www.npmjs.com/package/https-dev
- npm.io page: https://npm.io/package/https-dev

## Dependencies (2)

- [del](https://npm.io/package/del.md) ^3.0.0
- [selfsigned](https://npm.io/package/selfsigned.md) ^1.10.3

## Recent versions

- 0.0.2 (latest) — 2018-08-20
- 0.0.1 — 2018-08-20

## README

# https-dev

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

Extracted from [webpack-dev-server](https://github.com/webpack/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

```js
const https = require('https');

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

const ssl = httpsDev();

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

### Express

```js
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

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents

-   [index](#index)

### index

https-dev

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** https.createServer options

## Alternatives

* [devcert](https://github.com/davewasmer/devcert)
* Tunnels (paid) such as [ngrok](https://ngrok.com) or [forward](https://forwardhq.com)

## License

MIT © [Duncan Beaton](http://dunckr.com)

---
_Source: https://npm.io/package/https-dev · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
