JSPM

live-secure-context

0.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q9599F
  • License MIT

Live reload the secure context from file, like private keys and certificates.

Package Exports

  • live-secure-context

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (live-secure-context) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

live-secure-context

Live reload the secure context from file, like private keys and certificates.

Usage

const https = require('https')
const liveSecureContext = require('live-secure-context')

const hostname = '127.0.0.1'
const port = 3000

const server = https.createServer((req, res) => {
  res.statusCode = 200
  res.setHeader('Content-Type', 'text/plain')
  res.end('Hello World')
})

liveSecureContext(server, {
  key: './key.pem',
  cert: './cert.pem'
})

server.listen(port, hostname)

Development

$ npm install
$ npm test

License

MIT