An open API service indexing awesome lists of open source software.

https://github.com/imcuttle/https-wrapper

Wrap http server as https
https://github.com/imcuttle/https-wrapper

Last synced: 5 months ago
JSON representation

Wrap http server as https

Awesome Lists containing this project

README

          

# https-wrapper

[![Build status](https://img.shields.io/travis/imcuttle/https-wrapper/master.svg?style=flat-square)](https://travis-ci.org/imcuttle/https-wrapper)
[![Test coverage](https://img.shields.io/codecov/c/github/imcuttle/https-wrapper.svg?style=flat-square)](https://codecov.io/github/imcuttle/https-wrapper?branch=master)
[![NPM version](https://img.shields.io/npm/v/https-wrapper.svg?style=flat-square)](https://www.npmjs.com/package/https-wrapper)
[![NPM Downloads](https://img.shields.io/npm/dm/https-wrapper.svg?style=flat-square&maxAge=43200)](https://www.npmjs.com/package/https-wrapper)
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://prettier.io/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)

> Wrap http server as https

Thanks for [`http-proxy`](https://npmsjs.com/http-proxy) and [`create-cert`](https://npmjs.com/create-cert)

## Installation

```bash
npm install https-wrapper
# or use yarn
yarn add https-wrapper
```

## Usage

```javascript
const httpsWrapper = require('https-wrapper')

;(async () => {
const proxyServer = await httpsWrapper({
// extends http-proxy options and create-cert options
})

// More information see https://npmjs.com/http-proxy
proxyServer.listen(8080)
})()
```

### CLI

```
https-wrapper --help
```

## Contributing

- Fork it!
- Create your new branch:
`git checkout -b feature-new` or `git checkout -b fix-which-bug`
- Start your magic work now
- Make sure npm test passes
- Commit your changes:
`git commit -am 'feat: some description (close #123)'` or `git commit -am 'fix: some description (fix #123)'`
- Push to the branch: `git push`
- Submit a pull request :)

## Authors

This library is written and maintained by imcuttle, moyuyc95@gmail.com.

## License

MIT - [imcuttle](https://github.com/imcuttle) 🐟