Socket
Socket
Sign inDemoInstall

autocert

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autocert

Get a TLS options object to automagically certify your domains


Version published
Maintainers
0
Created
Source

autocert

Get a TLS options object that will automagically certify your domains.

Why

Obligatory Let's Encrypt thingy.

How

acme-client

Example

var http = require('http')
var https = require('https')
var autocert = require('./')

var challenges = {}

http.createServer((req, res) => {
  var proof = challenges[req.url]
  if (proof) {
    res.end(proof)
  } else {
    res.statusCode = 404
    res.end('not found')
  }
}).listen(80)

https.createServer(autocert.tlsOpts({
  email: 'info@example.com',
  challenges,
}), (req, res) => {
  res.end('secure af')
}).listen(443)

License

MIT

FAQs

Package last updated on 05 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc